Enums

suggest change

Use a singular name for most Enums

public enum Volume
{
   Low,
   Medium,
   High
}

Use a plural name for Enum types that are bit fields

[Flags]
public enum MyColors
{
    Yellow = 1,
    Green = 2,
    Red = 4,
    Blue = 8
}

Note: Always add the FlagsAttribute to a bit field Enum type.

Do not add ‘enum’ as a suffix

public enum VolumeEnum // Incorrect

Do not use the enum name in each entry

public enum Color
{
    ColorBlue, // Remove Color, unnecessary
    ColorGreen,
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Naming Conventions:
* Enums

Table Of Contents
17 Regex
19 Arrays
21 Enum
22 Tuples
24 GUID
27 Looping
36 Casting
46 Methods
53 Naming Conventions
88 Events
92 Structs
104 Indexer
106 Stream
107 Timers
109 Threading
127 Caching
135 Pointers
147 C# Script