Skip to Content
0
Former Member
Jul 07, 2009 at 01:53 PM

Casting of object reference

511 Views

Hi all,

i have two classes 'super' and 'sub'. 'sub' inherits from 'super'.

I have got a reference of type 'super' which points to an object of type 'sub'.

How can i cast the reference from 'super' to 'sub' without knowing the class 'sub'???

With RTTI i just got the name of class 'sub'....

thx in advance.

Regards,

Markus