Imagine the following classes:
class A
{
public string Test {get; set;}
}
class B : A
{
.. some other members ..
}
Now I am given a MemberExpression that was created from something similar to instance.Test
where instance is of type B.
Using the MemberExpression.Member.DeclaringType property returns that the declariny type of the Test-Property is class A – of course.
However, is there any way to get to know that the Test-property was originally invoked on type B?
Does
MemberExpression.Expression.Typedo what you want?