Reputation: 4371
I have a MemberExpression
that contains the following: mail => mail.SomeProperty
.
I want to generate a new member expression to access one level deeper in the hierarchy and have some result like the following: mail => mail.SomeProperty.OtherProperty
.
How to do this?
Upvotes: 4
Views: 313
Reputation: 27495
I believe you can use Expression.Property to construct a new MemberExpression that wraps the existing expression with an additional property reference. It takes an Expression for the first argument, which should be the original MemberExpression.
Upvotes: 4