Tuesday 15 February 2011

c# - Difference between lambda expression and expression lambda -


Is there any difference between lambda expressions and expression lambda?

If that is the case then what is the difference

This question was found in the link given below, but the answer did not understand what expression is Lambda?

The answer mentioned in that link is A lambda expression with an expression on the right is called expression lambda.

According to my understanding, expression is always in the right hand, this is the reason why I am asking this question. I'm unaware of anything.

This is a really confusing jargon; We can not do anything better

A Lambda expression is a catch-all word for any of these:

  x = & gt; M (x) (x, y) = & gt; M (x, y) (int x, int y) = & gt; M (x, y) x = & gt; {Return M (x); } (X, y) = & gt; {Return M (X, Y); } (Int x, int y) = & gt; {Return M (X, Y); }   

The first three are expression lambda because the right hand of the Lambda operator is an expression. Last three statement length because the Lambda operator's right hand Is an block .

It also shows that there are three possible syntax left side: either a parameter name, or a bracket list of unused parameters, or a bracket list of the typed parameters.

No comments:

Post a Comment