I am not sure how to create this expression:
(e => e.Prop1, e.Prop2, e.Prop3)
I want to pass an expression like this into a method so I can iterate through the collection and pull out the property names.
pseudo method:
public void ParseProperties<T>(The_Expression_being_Passed_In)
{
foreach(var member in expression.members)
{
.....
}
}
You need to accept a parameter of type
So you can say
You’ll have to write
GetPropertyName; implementations abound on StackOverflow.You can’t quite call it like you desire. You’ll have to say