Enumeration’s Cases Comparisons

By Frederic Bouchery

Enumeration cases are different when the enumeration are different, not when the value of the case is different. It is a differenc with using constants for enumerations.

To compare their value, the comparison must be done with the ‘value’ property, not the object.

../_images/enum_case_comparisons.png