Enums aren’t evil. Conditional statements everywhere are
Are you seeing the same conditional statements (if/switch) against enums littered everywhere? There are different ways of handling that, but a lot of it comes down to your context. Conditionals around type checking, extension methods, Inheritance, and Polymorphism are all options. YouTube Check out my YouTube channel, where I post all kinds of content accompanying my posts, including this video showing everything in this post. Enums The original examples of this problem come from a video by Nick Cosentino, which he tagged me in. The gist is that there are a lot of conditional, in this case “if statements,” throughout a codebase… Read More »Enums aren’t evil. Conditional statements everywhere are