How to an Enumeration, Days, is declared in C#

  1. using System;  
  2. using System.Collections.Generic;  
  3. using System.Linq;  
  4. using System.Text;  
  5. using System.Threading.Tasks;  
  6. namespace enumDaysByName   
  7. {  
  8.     enum DaysByName   
  9.     {  
  10.         Sunday = 1, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday  
  11.     }  
  12.     class Enum   
  13.     {  
  14.         static void Main(string[] args)  
  15.         {  
  16.             DaysByName today = DaysByName.Sunday;  
  17.             Console.WriteLine("Today is : {0}", today);  
  18.             Console.WriteLine("5 * 7 = {0}", (int) DaysByName.Thursday * (int) DaysByName.Saturday);  
  19.         }  
  20.     }  
  21. }  
Output:
 
Today is : Sunday 
4 * 6 = 35