while deepening myself to more advanced features of C#, I came across some code, which I didn't exactly know the difference of. It's about these two lines:
Func<string, int> giveLength = (text => text.Length);
and
Func<string, int> giveLength = delegate(string text) { return text.Length; };
This can be used in the same way:
Console.WriteLine(giveLength("A random string."));
So basically.. What is the difference of these two lines? And are these lines compiling to the same CIL?