Skip to content


Lambda Expressions

What are Lambda Expressions?

C#  introduced the concept of anonymous methods, which allow code blocks to be written “in-line” where delegate values are expected.

Lambda Expressions provide a more concise, functional syntax for writing anonymous methods.They end up being super useful when writing LINQ query expressions – since they provide a very compact and type-safe way to write functions that can be passed as arguments for subsequent evaluation.

List stringList = GetList();
//filter list whose value starts with "am"
stringList = stringList.Where(name => name.StartsWith("am")).ToList();

e.g. In above example name is parameter name of string record.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
  • Twitter
  • Yahoo! Buzz

Posted in C#, Linq.

Tagged with , .


3 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. GarykPatton says

    How soon will you update your blog? I’m interested in reading some more information on this issue.

  2. CrisBetewsky says

    Your site is worth beeing in the top cause it contains really amazing information.

  3. DotNetDude says

    Great Info buddy!



Some HTML is OK

or, reply to this post via trackback.