Possible Duplicates:
Good tutorials for lambda
Lambda Explanation and what it is as well as a good example
C# Lambda expression, why should I use this?
Can someone explain to me how to use this and give me examples? How do we read it?
Example !=
is read as "not equals to." So =>
means what?
C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...
Full form of C is “COMPILE”.
C is a general-purpose language that most programmers learn before moving on to more complex languages. From Unix and Windows to Tic Tac Toe and Photoshop, several of the most commonly used applications today have been built on C. It is easy to learn because: A simple syntax with only 32 keywords.
C is a general-purpose programming language created by Dennis Ritchie at the Bell Laboratories in 1972. It is a very popular language, despite being old. C is strongly associated with UNIX, as it was developed to write the UNIX operating system.
All lambda expressions use the lambda operator =>, which is read as "goes to". The left side of the lambda operator specifies the input parameters (if any) and the right side holds the expression or statement block. The lambda expression x => x * x is read "x goes to x times x." This expression can be assigned to a delegate type as follows:
From the docs
the => operator has the same precedence as assignment (=) and is right-associative.
"=>" is lambda operator and is read as "goes to"
This is the lambda operator. Which means 'goes to'. It is used to create lambda expressions which is syntax offered by C# for anonymous methods.
eg. lamda expression x=>x > 2
. This mean that given x, x goes to x greater than 2. In other words this lambda expression will select x greater than 2.
Anonymous method for the same can be written as
delegate(int x){return x > 2;}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With