Remove Redundant Constructor
In This Article
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 TestClass│Public Sub New()
End Sub
Private _intField As Integer
End Class
Result:
class TestClass
{│private int _intField;
}
Class TestClass│Private _intField As Integer
End Class