Skip to main content

RCS1134: Remove redundant statement

Properties

PropertyValue
Default SeverityHidden
Minimum language version-

Examples

Example #1

diagnostic.cs
if (x)
{
// ...

return false;
}

return false;
fix.cs
if (x)
{
// ...
}

return false;

Example #2

diagnostic.cs
public void Foo()
{
// ...

return;
}
fix.cs
public void Foo()
{
// ...
}

Example #3

diagnostic.cs
foreach (object item in items)
{
/// ...

continue;
}

Applies to