Itβs clear here that the meaning of developers is a string that refers to the location of the character memory.
No no. The value of developers is of type Members . It is converted to a string using the Console.WriteLine method. You will call the Console.WriteLine(object) overload, which will place the value - and then Console.WriteLine will call ToString on that value in the box, specifying the corresponding name of the enumeration value.
If we transfer members. HighlyQualifed for int, then the return value is 0. How does this happen?
HighlyQualified is the first member declared in Members , and you have not specified any specific value. By default, the C # compiler assigns the value 0 to the first declared value, and then increments by 1 each time. If you drop Members.Qualified to int , you will get 1.
What value is actually stored on the stack for the enum type?
A value that is actually just a number. (In this case, int , because it is the base type by default. But the stack slot has the correct type - the enumeration type.
source share