October 2008
Intermediate to advanced
784 pages
18h 11m
English
An enum type is a distinct value type (§4.1) that declares a set of named constants.
The example
enum Color { Red, Green, Blue }
declares an enum type named Color with members Red, Green, and Blue.
An enum declaration declares a new enum type. An enum declaration begins with the keyword
enum, and defines the name, accessibility, underlying type, and members of the enum.
enum-declaration: attributesopt enum-modifiersopt enum identifier enum-baseopt enum-body ;opt
enum-base: : integral-type
enum-body: { enum-member-declarationsopt } { enum-member-declarations , }
Each enum type has a corresponding ...