Sometimes we want the variable to fetch a value from a fixed set, and then we can use the enumeration type.
Cases:
enumOpenMode:byte{New=1, edit=2, view=3 } classProgram {Static voidMain (string[] args) {OpenMode OpenMode=OpenMode. Added; Console.WriteLine ("myorientation = {0}", OpenMode); Console.readkey (); } }
The print result is typed, adding these two words instead of numbers.
That is, when an enumeration is instantiated, its value is defined as the part preceding the medium equal sign, and the part following the equal sign indicates.
struct keywords are structs.
Struct really does not need to have an example, a struct is a class that indicates that it is a class of value type. The value type is on the stack, and the instance of the class is on the heap.
It can be understood that the struct is a lightweight class.
The "1" enumeration and structure of the net base of the evil complement