Typcasting from a variable?
Posted: Thu Jun 14, 2012 2:51 pm
This is really basic but I'm unsure on how to do it.
Can I typecast with a variable if I dont know what class the object is going to be?
e.g.
or is there some setClass() method for objects?
Would really appreciate knowing how to do this!
Can I typecast with a variable if I dont know what class the object is going to be?
e.g.
Code: Select all
someMethod(obj : Object; member : Class)
begin
//set the class of obj to be member
obj.Member
Would really appreciate knowing how to do this!