Concept of ENUM with sample example to understand

Posted by Amatya under C# category on | Points: 40 | Views : 3157
Enum - An enumeration is a set of named integer constant.
An enumerated type is declared using the enum keyword.c# enumeration are of value dataType.

class DNF
enum Days{Mon, Tues, wed, Thrus, Fri, Sat, Sun};
static void Main(string args[])
int W_Start = (int)Days.Mon;
int W_End = (int)Days.Fri;
Console.WriteLine(W_Start, W_End);

Output 0,4

Comments or Responses

Login to post response