13 August 2012

Structure vs Enumeration


Structure vs Enumeration
EnumerationStructure
Enumerations are a distinct type consisting of a set of named constants called the enumerator list.A structure is a value type and the instances or objects of a structure are created in stack.
Every enumeration type has an underlying type, which can be any integral type except char.A struct can contain fields, methods, constants, constructors, properties, indexers, operators and even other structure types.
Enumerations are integer-types that make code clearer and easier to maintain.Structs are similar to clases, but are intended to be used to group similar items of data together.

No comments: