Ever wondered how Binary Enums works ?
Binary enums are enums build up with the values 1, 2, 4, 8, 16, 32, 64, 128, 256, etc. The idea of binary enums are to be able to check if one or more of the enum values are set in a value.
An example:
Vehicle = 1, Car = 2, Motorcycle = 4
Value 3 => Vehicle + Car
(more…)