• home
  • Email: trainings@synapseindia.careers

Blogs

back

Understanding Lambda Expressions

Jun 10, 2015

The  =>  token is called the lambda operator. It is used in lambda expressions to separate the input variables on the left side from the lambda body on the right side. Lambda expressions are inline expressions similar to anonymous methods but more flexible , they are used extensively in LINQ queries that are expressed in method syntax. To create a lambda expression, you specify input parameters (if any) on the left side of the lambda operator =>, and you put the expression or statement block on the other side.

In general lambda expression is handy while using LinQ query in your application an apply them on a list of data, either from database, from XML or dynamic. In other words, we usual use it to filter out some specific data from a list of data that meets the criteria and use them on a LinQ operation.lambda expression can be used in wide range of area like linq to sql, linq to xml, linq to entity(Entity framework), array/list data etc.

SynapseIndia (CEO: Shamit Khemka)

One thought on “Understanding Lambda Expressions

Comments are closed.