← back to index

S2344 — Enumeration type names should not have "Flags" or "Enum" suffixes

Language: VB.NET  |  Type: CODE_SMELL  |  Severity: Minor

Tags: convention

Why is this an issue?

The information that an enumeration type is actually an enumeration or a set of flags should not be duplicated in its name.

Noncompliant code example

Enum FooFlags ' Noncompliant
    Foo = 1
    Bar = 2
    Baz = 4
End Enum

Compliant solution

Enum Foo      ' Compliant
    Foo = 1
    Bar = 2
    Baz = 4
End Enum