Fundamentally, is there any difference between a single-line expression lambda and a statement lambda? Take the following code, for example:
private delegate
No, there is no difference in this example. If the body of the lambda is only one expression, you can drop the brackets. However, once the lambda contains more than one expression, like so:
MyDelegate myDelegate2 = () => {
Console.WriteLine("Test 2");
Console.WriteLine("Test 2");
};
the brackets are mandatory.