G
Guest
Hi,
I have a situation where I would like to extend an abstract (MustInherit)
class that uses a Generic parameter. The class declaration looks like this...
Public MustInherit Class BaseClass(Of T)
There is an Overridable method in this class that I would like to override.
There will be many classes in my program that need to derive from
BaseClass(Of T) but I only need one version of the Override method.
I'd like to do this...
Public MustInherit Class DerivedAbstractClass(of T) : Inherits BaseClass(of T)
I'd put my version of the Overrideable method here, and then use this class
as the parent of all my derived classes.
But the compiler says I cannot have a generic parameter in the Inherits part
of the declaration of my class.
Am I stuck with copying the same Override method into every class that
derives from BaseClass(Of T)?
Any suggestions?
Thanks.
BBM
I have a situation where I would like to extend an abstract (MustInherit)
class that uses a Generic parameter. The class declaration looks like this...
Public MustInherit Class BaseClass(Of T)
There is an Overridable method in this class that I would like to override.
There will be many classes in my program that need to derive from
BaseClass(Of T) but I only need one version of the Override method.
I'd like to do this...
Public MustInherit Class DerivedAbstractClass(of T) : Inherits BaseClass(of T)
I'd put my version of the Overrideable method here, and then use this class
as the parent of all my derived classes.
But the compiler says I cannot have a generic parameter in the Inherits part
of the declaration of my class.
Am I stuck with copying the same Override method into every class that
derives from BaseClass(Of T)?
Any suggestions?
Thanks.
BBM