I have the following scenario:
class A
{
string Foo;
}
Class B
{
A PropertyA;
}
Class C
{
B PropertyB;
}
Is it possible using .NET reflection to get the value of A.Foo if I start with object C? The problem I am running into is this: I get to A through PropertyInfo objects. However, they don't have the instance information stored with them. Therefore, I can't do GetProperty("Foo").GetValue(....) since I only have object of type C passed in.