Output enum values : Enum format : Data Type C# Examples


C# Examples » Data Type » Enum format »

 

Output enum values









    
using  System;

enum  Color
{
      Green,
      Yellow,
      Red
}

class  MainClass
{
      static  void  Main()
      {
            Console.WriteLine("{0}",  Color.Green);
            Console.WriteLine("{0}",  Color.Yellow);
            Console.WriteLine("{0}",  Color.Red);
      }
}
    
   
  
   



Output

Green
Yellow
Red


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Enum format