Declaration of enum data type : Enum : Data Type C# Examples


C# Examples » Data Type » Enum »

 

Declaration of enum data type









    
using  System;

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

class  MainClass
{
    static  void  Main(string[]  args)
    {
        DaysOfWeek  Today  =  DaysOfWeek.Monday;

        Console.WriteLine(Today);
    }
}
    
   
  
   



Output

Monday


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Enum