namespace_ May 14 _ enum type {classProgram {enumMeiju//the default is int when no value type is specified{ One=3,//is not an assignment, it is a pointer to an index, index 3rd is the index position of onetwo=6,//index number 6th is the constant of theThree,//each line is separated by commas, and the last comma can be omittedfour =//if a constant equals a previous constant, then it is equal to this constant, and here is the assignment } enumMEIJU1 { One=1, the other=2, three, four=Three,}Static voidMain (string[] args) { //struct: Define the next set of variables//Enum Type: Defines the next set of constants, can only be referenced, cannot be assigned a const int q=5;Console.WriteLine (meiju.one);//print out "one"Console.WriteLine (Meiju.four);//The print is "both" .Console.WriteLine (meiju1.four);//It's printed "three."Console.ReadLine (); } }}
May 14 Enumeration type