I understand a lambda expression is in essence an inline delegate declaration to prevent the extra step
example
delegate int Square(int x)
public class Program
{
static void Main(String[] args)
{
Square s = x=>x*x;
int result = s(5);
Console.WriteLine(result); // gives 25
}
}
How does one apply Lambda expressions to multi parameters Something like
delegate int Add(int a, int b)
static void Main(String[] args)
{
// Lambda expression goes here
}
How can multi parameters be expressed using Lambda expressions?