Slashdot Mirror


User: pietvo

pietvo's activity in the archive.

Stories
0
Comments
1
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1

  1. Re:Could someone help me out? on Anders Hejlsberg on C# 3.0 · · Score: 1

    c => c.City == "London" is a function returning a bool, while (c.City == "London") is just a bool. So they are different. Moreover the latter will give an error as c is an undefined variable. The reason you have to give a function is that this function has to be called for every tuple. If you would give just an expression, it is true or false depending on the value c has at the moment of the call, which has no relationship with the tuples to be inspected.

    And a lambda expression is just called like other functions: f(x) where f is the name of the parameter in the definition of the called method.