Archive

Posts Tagged ‘Enumerations’

Declaring enumeration types and its elements in CodeRush

December 14th, 2011 Comments off

An enumeration type is a special set of related constants, each with an integer value. Enumerations are useful for defining states and sequences, particularly when there is a natural progression through those states. Each constant in the enumeration list can be compared and formatted using either its name or value. For example, assume that you have to define a variable whose value will represent a day of the week. There are only seven meaningful values which that variable will ever store. To define those values, you can use an enumeration type.

Read more…