Metty

Metty

  • NA
  • 1
  • 0

Change Classes while runtime?

Jan 3 2006 7:55 PM
See: http://web48.isp4net.de/other/class.jpg I have an Class A, which is in the core, so I cant change it. Its function is called by an function which is in the core too. Now i inheritanced everything from Class A to a new Class B and created an override of the function called by the core. Now i want to change my A to the class B, so that the new function is called and not the function of Class A. How to do this without changing the Core? Class A is a "public class" which inheritated from another class. The function of Class A is inheritated ("public override void"). The Original function is a "public virtual void". Class B inheritated everything from Class A. Class B overrides the function of Class A => "public override void". Now i just have to change the type of..lets say "Test" from A to B...but how? I have to change it while running and i can't edit the core, which originally calls the function of A....

Answers (1)