Possible Duplicate:
What is the => token called?
Hey,
In LINQ what is the name of the => operator e.g:
list.Where(a => a.value == 5);
Possible Duplicate:
What is the => token called?
Hey,
In LINQ what is the name of the => operator e.g:
list.Where(a => a.value == 5);
It's called the lambda operator and is pronounced "goes to".
From here.
It's the lambda operator. Or at least, an expression of the form
x => y
(or any of the longer forms involving =>
) is a lambda expression. (I don't personally tend to think of it as an operator as such, even though the linked page refers to the lambda operator. The C# 4 spec doesn't contain the phrase "lambda operator" anywhere.)
You read it as "such that". So your example reads as "list where a such that a dot value equals 5"
Its used to create delegates or expression tree types, and yes the new term for it is lambda expression