Ok, I think I get it. Instead of passing the result of c => c.City == "London", you're passing the function itself, which can then be used by the Where() function. That is neat. Thanks a lot for the replies.
How do you call a lambda expression? I'm familiar with anonymous methods in delegates, but I don't understand how c => c.City == "London" for a parameter, which returns a bool, is easier than just saying (c.City == "London"), which also returns a bool. In the first case, "c" would only be used once, so what's the point?
Thanks in advance,
Alek
What I don't get is why doesn't anybody realize that this could save energy? I'm not sure how important the environment is to people on Slashdot, but if there's a way to reduce energy consumption, shouldn't it be done, even if it takes a little while to work out the bugs? After all, a saving only a little annually would compound, and after 10 or 20 years, we'd be much better off. If daylight savings time is changed to be more in-line with the sun, all of you (who live in the US anyway) would have much lower electric bills, since you'd turn off your lights earlier.
It's obvious that we're never going to get everybody to recycle, so this seems like the logical thing to do. It forces people to save energy on a larger scale.
It was kinda fun controlling ther people's computers... they also had a remote desktop program on almost all computers. "Hey! My computer has a mind of its own!" they'd yell. Well, it was fun 'till I got caught.
Anything's better than trying to force security with Windows. Took me only a few weeks to hack my school's security system (they used Fortres on Win98 for most of the school). It'd be way harder with Linux.
Anything's better than having to force security with Windows. Took me only a few weeks to crack the programs my high school used. Got a week's suspension for that 'cause someone ratted me out. Hopefully using a more secure O/S will prevent other kids from making that mistake.
Ok, I think I get it. Instead of passing the result of c => c.City == "London", you're passing the function itself, which can then be used by the Where() function. That is neat. Thanks a lot for the replies.
How do you call a lambda expression? I'm familiar with anonymous methods in delegates, but I don't understand how c => c.City == "London" for a parameter, which returns a bool, is easier than just saying (c.City == "London"), which also returns a bool. In the first case, "c" would only be used once, so what's the point? Thanks in advance, Alek
What I don't get is why doesn't anybody realize that this could save energy? I'm not sure how important the environment is to people on Slashdot, but if there's a way to reduce energy consumption, shouldn't it be done, even if it takes a little while to work out the bugs? After all, a saving only a little annually would compound, and after 10 or 20 years, we'd be much better off. If daylight savings time is changed to be more in-line with the sun, all of you (who live in the US anyway) would have much lower electric bills, since you'd turn off your lights earlier.
It's obvious that we're never going to get everybody to recycle, so this seems like the logical thing to do. It forces people to save energy on a larger scale.
It was kinda fun controlling ther people's computers... they also had a remote desktop program on almost all computers. "Hey! My computer has a mind of its own!" they'd yell. Well, it was fun 'till I got caught.
Anything's better than trying to force security with Windows. Took me only a few weeks to hack my school's security system (they used Fortres on Win98 for most of the school). It'd be way harder with Linux.
Anything's better than having to force security with Windows. Took me only a few weeks to crack the programs my high school used. Got a week's suspension for that 'cause someone ratted me out. Hopefully using a more secure O/S will prevent other kids from making that mistake.
Just watch. Soon they'll be blocking access to "terrorist-related" web sites.