Get all stats for EmpType.

   
   
using System;

enum EmpType : byte {
    Manager = 10,
    Grunt = 1,
    Contractor = 100,
    VP = 9
}

class Program {
    static void Main(string[] args) {
        EmpType fred;
        fred = EmpType.VP;

        Array obj = Enum.GetValues(typeof(EmpType));
        Console.WriteLine("This enum has {0} members:", obj.Length);
    }
}

   
    
     


This entry was posted in Data Types. Bookmark the permalink.