Print out string version of an enum value : Enum base type : Data Type C# Examples


C# Examples » Data Type » Enum base type »

 

Print out string version of an enum value









    
using  System;

enum  EmployeeType  :  byte  
{
    Manager  =  10,
    Programmer  =  1,
    Contractor  =  100,
    Developer  =  9
}

class  MainClass
{
    public  static  void  Main(string[]  args)
    {
        
        EmployeeType  fred;
        fred  =  EmployeeType.Developer;
        
        Console.WriteLine(fred.ToString());


    }
}
    
   
  
   



Output

Developer


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Enum base type