Enum and Enumerable data

An enum is a custom data type of Name/Value pair.An enumeration is a class or structure that implements .net interface named Ienumerable.

Typically, this interface is implemented on collection classes, as well as the System.Array class

// Compile-time error! 999 is too big for a byte!

enum EmpType : byte

{

Manager = 10,

Grunt = 1,

Contractor = 100,

VicePresident = 999

}

 

 

Leave a Reply