An enum type is a distinct type with named constants. Enum declarations may appear in the same places that class declarations can occur.
The example
using System; enum Color { Red, Green, Blue }
declares an enum type named Color
with members Red
, Green
, and Blue
.