Thanks. Here's the code snippet.
I have a BinaryExpression (b), it's left member is a MemberAccessExpression to which I want to assign a value it's right member is a ConstantExpression of which I want to assign.Code:MemberExpression me = ((MemberExpression)b.Left); Type t = me.Expression.Type; ParameterExpression pe = (ParameterExpression)me.Expression; string strMemberName = me.Member.Name; MethodInfo methodInfo = t.GetProperty(strMemberName).GetSetMethod();
What I want to do is to create a CallExpression to to the SetValue method of the member to assign the value (b.right) to it.




Reply With Quote