It’s hard to find a developer who has never heard about enum. But do you use it correctly? Let’s find out. Correct naming The naming is one of the important things in development. Jokes aside. The best name for enum should reflect what it consists of. The good names are short and self-explanatory: , , etc. It’s that simple. There is no reason to add ‘s’, or ‘enum’ or call it ListOfEntitiesType. Brevity is the soul of wit. And don’t forget to use a namespace, so your enum will be separated by them. WindowName EntityType What can be the values of the enum members? By default, it's , and I recommend sticking with it. But sometimes, there is a requirement to do something different, and for the value of enum members, you can use any integral numeric type you like: bytes, int’s, long’s, and even shorts. int Correct indexing Many developers use invalid indexes as default. For example, or , or . These things are annoying. Let’s look at the example: you have an enum and class , which you send somewhere to draw some damage. -1 int.MinValue -99999 DamageType Damage { None = - , Range = , Magic = , Close = , } { public DamageType Type { get; set; } public int Amount { get; set; } ….. } enum DamageType 1 0 1 2 class Damage private private If you create this class with an empty constructor, you will get these default values: Type is , and Amount is . This is not logical since the default of will be None unless your goal is different. DamageType.Range 0 DamageType Useful snippets How to iterate through all elements of enum? Easy: allElementsOfEnum = . (typeof( )); var Enum GetValues MyEnum From that point, we can easily get random elements of enum. Or create one entity of each type. And this one is a bit complicated but interesting at the same time. Imagine that you are working over a real-world animal simulator. You have an urchin that lives on ground and can barely swim; you have a bass-fish that lives in water and barely can live on the surface: public { None = , Ground = , Water = , } enum AnimalHabitat 0 1 2 Then comes a game designer, and he asks you to add a turtle that lives both on the ground and underwater. We could add another element to the enum Amphibian that equals . And then, we will need to check animal habitat like this: 3 { the ground stuff } { the water stuff } if (animal. == AnimalHabitat.Ground || animal. == AnimalHabitat.Amphibian) habitat habitat //do ... if (animal. == AnimalHabitat.Water || animal. == AnimalHabitat.Amphibian) habitat habitat //do And then, each time we will add intercrossing behaviors, we will need to modify our code again. And the problem is that it interferes with the SOLID principle. With the S point to be exact, that says that there should be only one reason to change the class. And I don’t see any reason to change the behavior of the ground or water habitat here. We need to check if Amphibian has properties of ground behavior or water behavior. So let’s try another way! [Flags] public { None = , Ground = , Water = , Amphibian = Ground | Water, will be } enum AnimalHabitat 0b_0000_0000 0b_0000_0001 0b_0000_0010 //that 0b_0000_0011 And then you will need to recall some magic - the magic of bitwise operations. habitat = AnimalHabitat.Amphibian; (habitat & AnimalHabitat.Ground == AnimalHabitat.Ground) { } (habitat & AnimalHabitat.Water == AnimalHabitat.Water) { } var If //do the ground stuff ... If //do the water stuff Keep in mind that in this situation, you can have 8 flags (including zero, which will stand for None as we made a deal previously). And it will give you 256 combinations. Conclusion As we can see, the enum can be a powerful data structure that can help build up the logic of a game you are working on. And proper usage of enum benefits the process of development and will help support games in the future. Also published on: https://gamasutra.com/blogs/TymurKoshel/20210618/383786/Enums_in_C_and_how_to_cook_them.php .