C# 6.0 feature – Lambda Expression in Function Members

C# 6.0 lets the developers to use lambda expression as function member . For example , instead of the function body , you can write the lambda expression directly as shown below.

C# 6.0 feature – Lambda Expression in Function Members

public static int AddNumber(int a, int b) => a + b;
static void Main(string[] args)
{
        Console.WriteLine(AddNumber(2,3));
        Console.ReadLine();
}