Possible Duplicate:
find out the class type inside the class and its children
I have a method to invoke within a base class, a new requirement has arisen and now within this method i need to know which sub class it has been derived from, do you guys happen to know if this is possible?
Here is an example to illustrate the idea behind PeteBecker’s answer:
Have a look at http://ideone.com/HaAnY for the output.