C# Lambda expression syntax, is brackets necessary?

Posted by DevNovice on Stack Overflow See other posts from Stack Overflow or by DevNovice
Published on 2010-06-05T13:26:54Z Indexed on 2010/06/05 13:32 UTC
Read the original article Hit count: 162

Filed under:
|

I'm new in C# and earlier I saw the lambda expression is like (params) => { expression;}

but in LINQ, I saw examples like

IEnumerable customerFirstNames = customers.Select(cust => cust.FirstName);

No brackets.

Are they the same or is there any difference?

Thanks a lot.

© Stack Overflow or respective owner

Related posts about c#

Related posts about lambda-expressions