News for hackers. Stuff that matters.

dmiranda

Re:Best Practices for Linq Enumerables and Queryables on Friday August 24, 2012 @11:11AM (#4427933)
About your first point, sometimes using method syntax is more readable than query. When you are not reliying heavily on LINQ and just use some commands, is easier to write

    var males = customers.Where(c => c.Gender == "male");
than

    var males = from c in customers where c == "male" select c;
Not only because it's longer, but also because it can feel strange if you're not using it continously.