using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; public class Test { public static void Execute(int i) { Console.WriteLine("{0}", i); } public static void Main() { var exec = typeof(Test).GetMethod("Execute"); var actions = new List(); for (int i = 0 ; i != 100 ; i++) { var val = Expression.Constant(i+100100100); var call = Expression.Call(exec, val); var lambda = Expression.Lambda(typeof(Action), call, new ParameterExpression[0]); actions.Add((Action)lambda.Compile()); } foreach (var a in actions) a(); } }