T
theinsanecoder
I created several classes that supports custom typing as following:
Public Class DataManager(Of CustomType As {DataObject, New})
Public Class LockableDataManager(Of CustomType As {LockableDataObject,
New})
Inherits DataManager(Of CustomType)
Public NotInheritable Class BusinessManager
Inherits LockableDataManager(Of Business)
The problem i'm having is relative to CTYPE. If i try to verify that an
object passed to a function is of type LockableDataManager(Of
LockableDataObject) it never seems to resolve... If you follow the
hierarchy, a BusinessManager is a LockableDataManager(Of Business As
LockdableDataObject) and everything compiles fine but the following
line always returns false on the TYPEOF in the first part, the second
part works well.
If TypeOf pManager Is gumain.LockableDataManager(Of
gumain.LockableDataObject) AndAlso TypeOf Editor.EditedObject Is
gumain.LockableDataObject Then
(The Andalso Editor.EditedObject Is gumain.LockableDataObject resolves
to TRUE it is not the problem therefore)
Can you guys tell me what i can do to fix this and actually explain to
me what is wrong?
Thanks
Public Class DataManager(Of CustomType As {DataObject, New})
Public Class LockableDataManager(Of CustomType As {LockableDataObject,
New})
Inherits DataManager(Of CustomType)
Public NotInheritable Class BusinessManager
Inherits LockableDataManager(Of Business)
The problem i'm having is relative to CTYPE. If i try to verify that an
object passed to a function is of type LockableDataManager(Of
LockableDataObject) it never seems to resolve... If you follow the
hierarchy, a BusinessManager is a LockableDataManager(Of Business As
LockdableDataObject) and everything compiles fine but the following
line always returns false on the TYPEOF in the first part, the second
part works well.
If TypeOf pManager Is gumain.LockableDataManager(Of
gumain.LockableDataObject) AndAlso TypeOf Editor.EditedObject Is
gumain.LockableDataObject Then
(The Andalso Editor.EditedObject Is gumain.LockableDataObject resolves
to TRUE it is not the problem therefore)
Can you guys tell me what i can do to fix this and actually explain to
me what is wrong?
Thanks