Beyond the Enum.GetUnderlyingType() method, all C# enumerations support a method named
ToString(), which returns the string name of the current enumeration’s value. For example:
static void Main(string[] args)
{
Console.WriteLine("**** Fun with Enums *****");
EmpType emp = EmpType.Contractor;
Do'stlaringiz bilan baham: