Expression and delegate in c#
问题 I have below code that is a pseudo-code. I want to make this function can accept a Expresstion type, compile this expression and invoke it with proper parameters. public static void f<T>(Expression<T> exp, params dynamic[] d) { Console.WriteLine("begin"); exp.Compile().Invoke(d[0],d[1].....);//this is pseudo-code Console.WriteLine("end"); } I'm sure the T is an Action type. (T can be Action , Action<int> ,etc.). The parameter d is a array of dynamic type, which is sent to invoke. But I don't