Skip to main content

Copy switch section

PropertyValue
IdRR0212
Applicable Syntaxswitch section
Syntax Spanclose brace or empty line after switch section
Enabled by Default

Usage

Example #1

before.cs
switch (s)
{
case "a":
{
// ...

break;
}
default:
{
break;
}
}
after.cs
switch (s)
{
case "a":
{
// ...

break;
}
case "a":
{
// ...

break;
}
default:
{
break;
}
}

Configuration

roslynator_refactoring.copy_switch_section.enabled = true|false