Enumerations : Enum : Data Type C# Examples


C# Examples » Data Type » Enum »

 

Enumerations






An enumeration is a set of named integer constants.
The keyword enum declares an enumerated type.

The general form for an enumeration is




    
enum  name  {  
        enumeration  list  
};
    
   
  
   


name specifies the enumeration type name.
enumeration list is a comma-separated list of identifiers.


Each of the symbols stands for an integer value.
Each of the symbols has a value one greater than the symbol that precedes it.
By default, the value of the first enumeration symbol is 0.




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Enum