C# lambda expression reverse direction <=

C#LambdaOperators

C# Problem Overview


I have seen some code which uses the <= operator. Can you explain what is the use of having lambda in reverse direction?

C# Solutions


Solution 1 - C#

That's just less than or equal. I don't think C# lambdas work like that. It's too early in the morning. You need coffee.

Solution 2 - C#

That's not a lambda at all. That's less than or equal to

(Except when it's actually a reverse lambda)

Solution 3 - C#

It is only used as 'less than or equal to' operation, as in:

if (i <= 5) {
    // ...
}

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser215675View Question on Stackoverflow
Solution 1 - C#Dave MarkleView Answer on Stackoverflow
Solution 2 - C#David HedlundView Answer on Stackoverflow
Solution 3 - C#RazzieView Answer on Stackoverflow