Click here to Skip to main content
14,392,692 members

Lambda Expressions

Rate this:
3.44 (4 votes)
Please Sign up or sign in to vote.
3.44 (4 votes)
20 Dec 2015CPOL
Lambda expressions provide a concise, functional syntax for writing anonymous methods. They are super useful when writing LINQ query expressions.

This articles was originally at wiki.asp.net but has now been given a new home on CodeProject. Editing rights for this article has been set at Bronze or above, so please go in and edit and update this article to keep it fresh and relevant.

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

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

ASP.NET Community
United States United States
The ASP.NET Wiki was started by Scott Hanselman in February of 2008. The idea is that folks spend a lot of time trolling the blogs, googlinglive-searching for answers to common "How To" questions. There's piles of fantastic community-created and MSFT-created content out there, but if it's not found by a search engine and the right combination of keywords, it's often lost.

The ASP.NET Wiki articles moved to CodeProject in October 2013 and will live on, loved, protected and updated by the community.
Group type: Collaborative Group

759 members


Comments and Discussions

 
BugBroken Links Pin
Daniel Miller20-Dec-15 12:42
professionalDaniel Miller20-Dec-15 12:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Reference
Posted 11 Oct 2013

Stats

17.1K views
13 bookmarked