Chapter 18 Working with C#


Enumeration

You design a C# enumeration using a class with the <<enumeration>> stereotype. The code of the class attributes is used as enumeration values.


{
   public enum Color : colors
   {
      Red,
      Blue,
      Green,
      Max = Blue
   }
}

 


Copyright (C) 2007. Sybase Inc. All rights reserved.