In enumeration, the enumerators are also referenced by integer values 0 - the end enumerator, so:
Blue can be assigned using the integer 1 just as Red = 0, Blue = 1, Green = 2, and so on.Code:enum MyEnum { Red, Blue, Green } Colors;
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 11 of 11
Thread: Use enum from another class?Threaded View
|
Click Here to Expand Forum to Full Width |