Skip to content

Latest commit

 

History

History
53 lines (43 loc) · 1.06 KB

RR0207.md

File metadata and controls

53 lines (43 loc) · 1.06 KB

Sort case labels

Property Value
Id RR0207
Title Sort case labels
Syntax selected case labels with string literal or enum field
Enabled by Default

Usage

Before

bool Foo(string s)
{
    switch (s)
    {
        case "d":
        case "b":
        case "a":
        case "c":
            return true;
        default:
            return false;
    }
}

After

bool Foo(string s)
{
    switch (s)
    {
        case "a":
        case "b":
        case "c":
        case "d":
            return true;
        default:
            return false;
    }
}

See Also

(Generated with DotMarkdown)