C#

C#

Made by DeepSource

Reserving a member in an enum provides no benefit CS-R1080

Anti-pattern
Major

Usually keywords or variables are named as reserved to indicate that they are undocumented or will be modified some time in future. However, there's no point in reserving a member in an enum as you can always add a new member to an enum at any point. It is therefore recommended that you do not reserve any members in an enum.

Bad Practice

enum E1
{
    Foo,
    Bar,
    Baz,
    Reserved // Unnecessary
}

Recommended

enum E1
{
    Foo,
    Bar,
    Baz
}