C# 3.0(. NET 3.5) introduced the lambda expression along with LINQ . The lambda expression is a shorter way of representing anonymous method using some special syntax.
By using lambda expressions, you can write local functions that can be passed as arguments or returned as the value of function calls. Lambda expressions are particularly helpful for writing LINQ query expressions.
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.
Example:-
No comments:
Post a Comment