Søren M. Olesen wrote:
How do I create an instance of an object with an inherited cunstructor that
takes an argument??
Constructors are *not* inherited.
What you are seeing is the /implicit/ creation (by the VB compiler) of a
niladic Constructor in the derived class because /you/ haven't coded
/any/ Constructors of your own in that class.
The code that's running is more like:
Module Module1
Public Class MyBaseClass
Public Sub New()
Public Sub New(ByVal arg As Boolean)
Public Class MyClass2
Inherits MyBaseClass
Public Sub New() <--- this one is written for you.
The /only/ way to call the constructors in the base class is to do so
from a duplicate constructor in the derived class, as in
Public Class MyClass2
Inherits MyBaseClass
Public Sub New()
MyBase.New()
End Sub
Public Sub New(ByVal arg As Boolean)
MyBase.New(arg)
End Sub
End Class
HTH,
Phill W.