Permalink
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (37 sloc) 888 Bytes

RCS1191: Declare enum value as combination of names

Property Value
Id RCS1191
Category Readability
Default Severity Info
Enabled by Default
Supports Fade-Out -
Supports Fade-Out Analyzer -

Example

Code with Diagnostic

[Flags]
public enum Foo
{
    None = 0,
    A = 1,
    B = 2,
    C = 4,
    ABC = 7 // RCS1191
}

Code with Fix

[Flags]
public enum Foo
{
    None = 0,
    A = 1,
    B = 2,
    C = 4,
    ABC = A | B | C
}

See Also

(Generated with DotMarkdown)