Let’s assume I have a method like this:
public static List<T> Get<T>(this SomeObject<T>, Expressions<Func<T,bool>> e){
//get the property name and value they want to check is true / false
...
}
TheObject().Get(x => x.PropertyName == "SomeValue");
How do I get “PropertyName” and “SomeValue” when I pass it into the Get extension method?
I think this is what you’re after
Output:
Error checking is left as an exercise for the reader…