An enumeration is a set of named integer constants. An enumerated type is declared using the enum keyword.
C# enumerations are value data type. In other words, enumeration contains its own values and cannot inherit or cannot pass inheritance.
Where,
When the above code is compiled and executed, it produces the following result −
Declaring enum Variable
The general syntax for declaring an enumeration is −csharp
- The enum_name specifies the enumeration type name.
- The enumeration list is a comma-separated list of identifiers.
csharp
Example
The following example demonstrates use of enum variable −csharp
shellscript

