Remove Redundant Call

Removes a redundant call to a base constructor (C# only), and the String.Format call.

Availability

Available from the context menu or via shortcuts:

  • when the cursor is on a call to a redundant base constructor.
  • when the cursor is on a String.Format call with a single string parameter.

Examples

class BaseClass
{

}
class TestClass:BaseClass
{
    public TestClass()
        :base()
{
    }
}
Dim str As String = String.Format("Test")

Result:

class BaseClass
{

}
class TestClass:BaseClass
{
    public TestClass()
{
    }
}
Dim str As String = "Test"

Screenshot

rsRemoveRedundantCall