C# > Enums

C# > Enums


In this section we shall learn about the Enums.

Enums:

Enum is defined as enumeration which uses a keyword enum. It is a value type which is used to specify the group of numeric constants, These set of constants are called as enumeration list. Enumeration contains its own values and it can not inherit or pass inheritance. 

Declaring Enum:

public enum MyEnum
{
 constant1, constant2  //constants
}


In the above code snippet we had declared the enum  as myenum and we are assuming the enum constants as constant1, constant2, constant3.  

Read posts under C# > Enums

1 posts found
  1. Enums



Write for us






Hosting Recommendations