Okay, I have a an interface, lets call it
public interface bar {
string Foo;
}
also have a class that implements the interface
public fooBar : bar {
public string Foo {get; set;}
}
I then have a property hanging off another object that contains a list of interface "bar" that contain different implementations, like so,
public list<bar> listOfBars;
Now, when I use an expression tree/function like so
function(parentObj x) { x.listOfBars(0).Foo;}
I can get the memberinfo off of the expression tree. The memberinfo though is pointing to the interface method and its class is the interface. That almost works, but I need to know what its parent class is, so I would need from the memberinfo object to find and see its calling a method off of the "bar" interface, and the class type is "fooBar". Is there a way to do this, I've dug through the memberinfo object in the watch window and can't get to the parent type. I might be missing something though.