Saturday, May 21, 2022 18:01

Posts Tagged ‘flags’

Bit masks and the Flags enumerations attribute

Sunday, July 16th, 2017

Most programmers use enums just so they can enforce a predefined set of options from which users can chose. However, enums have one major disadvantage: they can only hold one value at a time. Let’s say we have the following code:


In this case, specifying that we want to have a direction towards left seems OK.… Read more


Follow the white rabbit