You can specify values for enumerations, this is necessary for flags:
[Flags]
enum MyFlags {
Alpha=1,
Beta=2,
Gamma=4,
Delta=8
}
What does [Flags] mean?
This means that the runtime will support bitwise operations on values. It does not matter for the values that the compiler generates. For example. if you do it
var x = MyFlags.Alpha | MyFlags.Beta;
with the Flags attribute, the result x.ToString()is " Alpha, Beta". Without an attribute, this will be 3. Also changes the behavior of the parsing.
EDIT: , , non-flags, , # 3 4 ( ).