Code using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace LambdaTest { class Program { delegateint TwoIntDelegate(int x, int y); privatestaticvoid Calculate(int x, int y, TwoIntDelegate calculator) { Console.WriteLine(calculator(x, y)); } staticvoid Main(string[] args) { Calculate(1, 2, delegate(int x, int y) { return x + y; }); Calculate(1, 2, (x, y) => x + y); } } }