E
Eidolon
I am looking to have a base class which provides that all inherited
classes MUST have some property, but that they can each define it as
whatever type they want. So maybe three class inherit from the base
class, each MUST have a [Type] property, but one defines it as
OracleType, one as SqlType and one as DB2Type, for example.
I know i can just declare it as Object, and then have the classes each
do typechecks on value assignment, but this is late-bound. I would like
some way to implement this so that the type-specificity of each class is
early-bound, allowing for compile time type checking.
Is this possible?
TIA-
- Aaron.
==============================================================
This is what i want (generic code)...
Class BaseClass
Public MustOverride Property Type
... other class code ...
End Class
Class OraClass
Inherits BaseClass
Public Overrides Property Type As OracleType
... other class code ...
End Class
Class SqlClass
Inherits BaseClass
Public Overrides Property Type As SqlType
... other class code ...
End Class
classes MUST have some property, but that they can each define it as
whatever type they want. So maybe three class inherit from the base
class, each MUST have a [Type] property, but one defines it as
OracleType, one as SqlType and one as DB2Type, for example.
I know i can just declare it as Object, and then have the classes each
do typechecks on value assignment, but this is late-bound. I would like
some way to implement this so that the type-specificity of each class is
early-bound, allowing for compile time type checking.
Is this possible?
TIA-
- Aaron.
==============================================================
This is what i want (generic code)...
Class BaseClass
Public MustOverride Property Type
... other class code ...
End Class
Class OraClass
Inherits BaseClass
Public Overrides Property Type As OracleType
... other class code ...
End Class
Class SqlClass
Inherits BaseClass
Public Overrides Property Type As SqlType
... other class code ...
End Class