How to call the method from a MethodCallExpression in c#
问题 I have a method call expression and try to invoke the method. I figured out a way, but I have problems in retrieving the parameter values since not every argument is described with a ConstantExpression. Expression<Action<T>> = t => t.DoSomething(Par0, Par1, Par2); MethodCallExpression methodCallExpression = selector.Body as MethodCallExpression; // get the information which is needed to invoke the method from the provided // lambda expression. MethodInfo methodInfo = methodCallExpression