Lambda Expressions in C#
1471
27-Nov-2015
I want to use Lambda Expressions in c# how to use please help me.
Anonymous User
27-Nov-2015Lambda expressions are anonymous functions that contain expressions or sequence of operators. All lambda expressions use the lambda operator =>, that can be read as “goes to” or “becomes”.
The left side of the lambda operator specifies the input parameters and the right side holds an expression or a code block that works with the entry parameters. Usually lambda expressions are used as predicates or instead of delegates (a type that references a method).
Expression Lambdas
Parameter => expression
Parameter-list => expression
Count => count + 2;
Sum => sum + 2;
n => n % 2 == 0
The lambda operator => divides a lambda expression into two parts. The left side is the input parameter and the right side is the lambda body.
c