How to assign enumeration cases to variables and constants?

In order to assign a enumeration case value to a variable or a constant, first declare the variable or a constant and assign the enumeration type and value using dot syntax. Once the variable is of enumeration type , further we can assign different individual case values  by just assigning the values and not the enumeration type.


Leave a Reply