Skip to main content

Remove Redundant Constructor

Removes an empty constructor, if it does not contain parameters.

#Availability

Available from the context menu or via shortcuts:

  • when the cursor is on a constructor declaration, provided that the constructor is empty and does not contain parameters.

#Examples

class TestClass
{
    public TestClass()
    {
    }
    private int _intField;
}
Class TestClassPublic Sub New()

    End Sub
    Private _intField As Integer
End Class

Result:

class TestClass
{private int _intField; 
}
Class TestClassPrivate _intField As Integer
End Class

#Screenshot

rsRemoveRedundantConstructor