3 ms·
https://stackoverflow.com/a/700325 https://stackoverflow.com/a/700325 to write out the internal structure of a LambdaExpression. If you just want the assignmen
by opminion 4y ago
https://stackoverflow.com/a/700325 https://stackoverflow.com/a/700325
to write out the internal structure of a LambdaExpression.
If you just want the assignments then it's simpler:
Add to the Evaluate method a test for MemberExpression and then:
The variable name is:
((MemberExpression)expr).Member.Name
The value is:
Expression.Lambda(expr).Compile().DynamicInvoke()