A
Albert Krüger
Hello
I have following problem:
'not a abstract class!
Public Class CBaseClass
Public Overridable AnyFunction() as Boolean
...
End Class
Public Class CSubClass
Inherits CBaseClass
Public Overloads AnyFunction() as Boolean
...
End Class
In another class I have a method:
Public Sub Anywhere(ByRef pobjAny As CBaseClass )
Begin
pobjAny.AnyFunction() 'here is my problem
End Sub
Now I have:
Dim CSubClass objSub
objSub = new CSubClass
Anywhere(objSub)
At method 'Anywhere' pobjAny.AnyFunction calls always the method of the base
class. But in some cases I need the call of AnyFunction of the base class,
sometimes of the sub class.
Where is my mistake?
Thanks
Albert Krüger
I have following problem:
'not a abstract class!
Public Class CBaseClass
Public Overridable AnyFunction() as Boolean
...
End Class
Public Class CSubClass
Inherits CBaseClass
Public Overloads AnyFunction() as Boolean
...
End Class
In another class I have a method:
Public Sub Anywhere(ByRef pobjAny As CBaseClass )
Begin
pobjAny.AnyFunction() 'here is my problem
End Sub
Now I have:
Dim CSubClass objSub
objSub = new CSubClass
Anywhere(objSub)
At method 'Anywhere' pobjAny.AnyFunction calls always the method of the base
class. But in some cases I need the call of AnyFunction of the base class,
sometimes of the sub class.
Where is my mistake?
Thanks
Albert Krüger