How to Create Enum in C#


Enums are value types and they store list of strongly type constants. You can create enum in C# as follows:

enum WeekDays 
{
    Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
}

 

 

About author


User avatar

Waqas Anwar

Founder of EzzyLearning.com, Senior Consultant, Microsoft .NET and Web Technologies

Comments