From time to time I see an enum like the following:
[Flags] public enum Options { None = 0, Option1 = 1, Option2 = 2, Option3 = 4, Op
In extension to the accepted answer, in C#7 the enum flags can be written using binary literals:
[Flags] public enum MyColors { None = 0b0000, Yellow = 0b0001, Green = 0b0010, Red = 0b0100, Blue = 0b1000 }
I think this representation makes it clear how the flags work under the covers.