J
Joeri
Hi,
I'm struggling with this issue, maybe someone has already
solved ik before. Here's the problem
I Have :
clsA witch is a base class
clsB inherits from clsA
clsC inherits from clsA
clsD inherits from clsA
At a certain point i have an instance of clsA : objA
What i can do is CType(objA, clsB).
But i would like to put it in a procedure and be able to
pass the resulting type as a parameter
Ex :
public sub Convert(DestinationType as ????)
CType (objA, DestinationType)
End Sub
Where destinationType could be clsB,clsC or clsD
I already tried a lot of possibilities but can't get it
to work.
Maybe anyone of you has an idea?
Thanks in advance
Best regards
Joeri
I'm struggling with this issue, maybe someone has already
solved ik before. Here's the problem
I Have :
clsA witch is a base class
clsB inherits from clsA
clsC inherits from clsA
clsD inherits from clsA
At a certain point i have an instance of clsA : objA
What i can do is CType(objA, clsB).
But i would like to put it in a procedure and be able to
pass the resulting type as a parameter
Ex :
public sub Convert(DestinationType as ????)
CType (objA, DestinationType)
End Sub
Where destinationType could be clsB,clsC or clsD
I already tried a lot of possibilities but can't get it
to work.
Maybe anyone of you has an idea?
Thanks in advance
Best regards
Joeri