Category: C#
-
The Trouble With Enums
Enums (enumeration types) are very tempting when you have a discrete set of cases. However, I find that 99% of the time when I think I need an enum, I actually don’t or, put it more precisely, an enum seems like a good idea but actually isn’t. Consider something as simple as enum WireColor {…