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:
Related in same category :
-
-
-
-
-
-
-
-
|