Sample:
ClassA: ClassB
ClassB: ClassC
ClassA x = new Class C
I want to know the declaring type of C.
x.GetType() returns C
x.GetType().BaseType returns B
x.GetType().BaseType.BaseType returns A, but I don't know the depth in my
program. So I don't know how many times I have to user
BaseType.BaseType.Ba.... etc.
x.GetType().DeclaringType does not exist. Don't know why.
How can I retrieve the declaring type of C?? So I need to now that the
declaring type of C is A.