Create Ancestor

Declares an ancestor class, making the current class its descendant, and generates a constructor for the declared class.

Availability

From the context menus or via shortcuts:

  • when the edit cursor or caret is on a class name within its declaration.

Example

class TestClass
{

}
Public Class TestClass

End Class

Result:

internal class TestClassBase
{
    public TestClassBase()
    {
}
}
class TestClass : TestClassBase
{

}
Public Class TestClassBase
    Public Sub New()
End Sub
End Class
Public Class TestClass
    Inherits TestClassBase

End Class