Skip to content

Gendarme.Rules.Naming.DoNotPrefixValuesWithEnumNameRule(2.10)

Sebastien Pouliot edited this page Feb 9, 2011 · 3 revisions

DoNotPrefixValuesWithEnumNameRule

Assembly: Gendarme.Rules.Naming
Version: 2.10

Description

This rule checks for enum values that are prefixed with the enumeration type name. This is typical in C/C++ application but unneeded in .NET since the enum type name must be specified anyway when used.

Examples

Bad example:

public enum Answer {
    AnswerYes,
    AnswerNo,
    AnswerMaybe,
}

Good example:

public enum Answer {
    Yes,
    No,
    Maybe
}
Clone this wiki locally