I have a “MustInherit” .NET class which declares a constructor with an integer parameter. However, Visual Studio gives me an error when I create any derived class stating that there is no constructor that can be called without any arguments. Is it possible to inherit the constructor with arguments?
Right now, I have to use
Public Sub New(ByVal A As Integer)
MyBase.New(A)
End Sub
in the derived classes. Is there any way to avoid this?
No, this is not possible. Every constructor that has arguments in the base class must be redeclared in the derived class.