65.9K
CodeProject is changing. Read more.
Home

Lambda Expressions

starIconstarIconstarIcon
emptyStarIcon
starIcon
emptyStarIcon

3.44/5 (4 votes)

Oct 11, 2013

CPOL
viewsIcon

60833

Lambda expressions provide a concise, functional syntax for writing anonymous methods. They are super useful when writing LINQ query expressions.

Lambda expressions provide a concise, functional syntax for writing anonymous methods. They are super useful when writing LINQ query expressions as they provide a very compact and type-safe way to write functions that can be passed as arguments for subsequent evaluation. Lambda Expressions were introduced in the .NET Framework 3.5.

A lambda expression is identified using the Func keyword, which takes 2 or 3 generic arguments as parameters.  In C#, <alias> => denotes a lamdba expression, whereas Function(<alias>) denotes a lambda in VB.NET.

Articles/Blogs