public void Invoke2() { ProcessData data = new ProcessData(); Action<int, int> myAction = (x, y) => Console.WriteLine(x + y); Action<int, int> myMultiplyAction = (x, y) => Console.WriteLine(x * y); data.ProcessAction(2, 3, myAction); }
public void Invoke1() { ProcessData data = new ProcessData(); BizRulesDelegate addDel = (x, y) => x + y; BizRulesDelegate multipleDel = (x, y) => x * y; data.Process(2, 3, addDel); }
public void Invoke3() { ProcessData data = new ProcessData(); Func<int, int, int> funcAddDel = (x, y) => x + y; Func<int, int, int> funcMultiplyDel = (x, y) => x * y; data.ProcessFunc(1, 2, funcMultiplyDel); data.ProcessFunc(1, 2, (x, y) => { x += 15; y += 2; return x / y; }); }