HNHacker News
TopNewBestAskShowJobs

dmiranda

3 karma · joined August 24, 2012

submissionscomments
dmiranda··on Best Practices for Linq Enumerables and Queryables
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.