Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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()



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: