Skip to main content

Sort case labels

PropertyValue
IdRR0207
Applicable Syntaxselected case labels with string literal or enum field
Enabled by Default

Usage

Example #1

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

Configuration

roslynator_refactoring.sort_case_labels.enabled = true|false