Public MustInherit Class MyParentClass Protected WithEvents _Caller As MyBaseClass Public Sub New(ByVal oObj As MyBaseClass) If Not oObj Is Nothing Then _Caller = oObj End If End Sub End ClassThen, there is a class that derives from the parent:
Public Class MyChildClass Inherits MyParentClass Public Sub run(ByVal parms As Object) Dim str As String ... End Sub End ClassAnd the call in code would ideally look something like this
Dim oClass As MyChildClass = New MyChildClass(MyCaller)As you can see, I want the Sub New() of derived class objects to take a caller object as a parameter in order to set a reference to it. However, this isn't working that easy as I am getting a message:
'MyChildClass' must declare a 'Sub New()' because its base class 'MyParentClass' does not have an accessible 'Sub New' that can be called with no arguments.'