Add missing cases to switch statement
Property | Value |
---|---|
Id | RR0059 |
Applicable Syntax | switch statement |
Enabled by Default | ✓ |
Usage
Example #1
before.cs
switch (dayOfWeek)
{
case DayOfWeek.Sunday:
break;
case DayOfWeek.Monday:
break;
case DayOfWeek.Tuesday:
break;
case DayOfWeek.Wednesday:
break;
case DayOfWeek.Thursday:
break;
}
after.cs
switch (dayOfWeek)
{
case DayOfWeek.Sunday:
break;
case DayOfWeek.Monday:
break;
case DayOfWeek.Tuesday:
break;
case DayOfWeek.Wednesday:
break;
case DayOfWeek.Thursday:
break;
case DayOfWeek.Friday:
break;
case DayOfWeek.Saturday:
break;
}
Configuration
roslynator_refactoring.add_missing_cases_to_switch.enabled = true|false