Skip to main content

RCS1070: Remove redundant default switch section

Properties​

PropertyValue
Default SeverityHidden
Minimum language version-

Examples​

Example #1​

diagnostic.cs
switch (s)
{
case "a":
return true;
case "b":
return false;
default:
break;
}
fix.cs
switch (s)
{
case "a":
return true;
case "b":
return false;
}

Applies to​