Click here to Skip to main content
12,355,066 members (39,348 online)
Click here to Skip to main content
Add your own
alternative version

Stats

8.6K views
11 bookmarked
Posted

Lambda Expressions

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

Editorial Note

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

721 members


You may also be interested in...

Comments and Discussions

 
BugBroken Links Pin
Daniel Miller20-Dec-15 11:42
professionalDaniel Miller20-Dec-15 11: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.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160621.1 | Last Updated 20 Dec 2015
Article Copyright 2013 by ASP.NET Community
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid