Working with Lambda Expressions
page 1 of 3
Published: 21 Feb 2008
Abstract
In this article, Brian discusses the usage and application of lambda expressions in .NET applications. After providing a short introduction, he examines the concepts with the help of source code and relevant explanation.
by Brian Mains
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 22216/ 43

Introduction

Lambda expressions reduce the amount of work needed when iterating through data.  All enumerable data is queryable through LINQ through the use of a SQL-like query (what I mean by that is the query looks like SQL, but is a different flavor). LINQ has an in-built mechanism to loop through enumerable data and use certain conditions setup in the where clauses to filter the data.  LINQ queries are quite effective in what they do.

Lambda expressions work in a similar way. Some of the existing extension methods feature built-in lamdba expressions to perform certain actions and to make it easier to perform repetitive work.  We shall see this soon.  Lambda expressions do not require extension methods to work, but this is the most common usage currently.


View Entire Article

User Comments

Title: Complexity?   
Name: old ecard guy
Date: 2008-05-07 3:50:57 PM
Comment:
The thing I am still looking for is a real life example where Lamba expressions actually simplify the code.

I would think it would be difficult for new developers to read an exiting code base that extensively used Lambdas. We'll see.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-19 8:28:52 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search