Visual C++ Enumerations in Class Designer

Class Designer supports C++ enum and scoped enum class types. Following is an example:

enum CardSuit {  
   Diamonds = 1,  
   Hearts = 2,  
   Clubs = 3,  
   Spades = 4  
};  

// or...  
enum class CardSuit {  
   Diamonds = 1,  
   Hearts = 2,  
   Clubs = 3,  
   Spades = 4  
};

A C++ enumeration shape in a class diagram looks and works like a structure shape, except that the label reads Enum or Enum class, it is pink instead of blue, and it has a colored border on the left and top margins. Both enumeration shapes and structure shapes have square corners.

For more information about using the enum type, see Enumerations.

See also

Working with Visual C++ Code
Enumerations