C# Enum: Definition, Examples, Best Practices, and Pitfalls
We’ve discussed arrays and lists in C#. This time, we’ll take the same journey with a funky little type called the enum. The C# enum is a very useful construct, but it has some quirky behavior that can bite you if you’re not careful.
Let’s now see what makes enums tick, how to use them effectively, and what to be careful of when using them.