Enum.GetUnderlyingType() : Enum « System « C# / C Sharp by API






Enum.GetUnderlyingType()

 

using System;

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

class MainClass
{
  public static void Main(string[] args)
  {
    
    Console.WriteLine(Enum.GetUnderlyingType(typeof(EmployeeType)));
  }
}

   
  








Related examples in the same category

1.Enum.Format()
2.Enum.GetNames
3.Enum.IsDefined
4.Enum.Parse