// "i" is our parameter list.
// "(i % 2) == 0" is our statement set to process "i".
List evenNumbers = list.FindAll(i => (i % 2) == 0);
The parameters of a lambda expression can be explicitly or implicitly typed. Currently, the
underlying data type representing the i parameter (an integer) is determined implicitly. The com-
piler is able to figure out that i is an integer based on the context of the overall lambda expression
and the underlying delegate. However, it is also possible to explicitly define the type of each param-
eter in the expression, by wrapping the data type and variable name in a pair of parentheses as
follows:
Do'stlaringiz bilan baham: |