static void Main(string[] args) { ActionTest target = new ActionTest(); MethodTest instance = new MethodTest(); target.DoExpressionAction(() => instance.Method1().Method2()); Console.ReadLine(); }
static void Main(string[] args) { ActionTest target = new ActionTest(); target.DoAction(() => Console.WriteLine("Action")); target.DoExpressionAction(() => Console.WriteLine("ExpressionAction")); Console.ReadLine(); }