C#
Enums and the HasFlag method (or 'How "1 + 0 = 1" can Ruin Your Day')
In .NET an enum is a type used to denote a complete set of simple constants. A simple example being the System.DayOfWeek enumeration. Enums can be decorated with the Flagsattribute which means that they can be combined. For instance, we may have an enumeration listing different pets that a