Assuming I have the superclass A, and the subclasses A1 and A2 which inherit from A, how could I get the subclass type of the variables in the code below?
A _a1 = new A1();
A _a2 = new A2();
// Need type of A1 and A2 given the variables _a1 and _a2.
Also, if I had another subclass A2_1 which is a sublcass of A2, how do I get the lowest subclass type given code below?
A _a2_1 = new A2_1();
EDIT: Thanks for answers. What a boo boo. Over thinking the problem and didn't even try GetType(). =/