Using let in LINQ to Objects – Part 2

In my previous post, I looked at what the compiler generates when you use the let keyword in LINQ to Objects. This is a follow-up post slanted towards performance. To this end, I set up four tests: static void TestBaseline() { var q = from c in Customer.AllCustomers select c; int count = q.Count(); }…

5

Using let in LINQ to Objects

I’ve been delving into LINQ to Objects recently (and enjoying it), but had missed the ‘let’ keyword. A colleague Rupert Benbrook(http://phazed.com) and I had been chatting about how to solve a particular issue using LINQ to Objects and he sent me a follow-up email with some code that used the ‘let’ keyword and I thought…

9