Articles in this series
Shakespeare will hopefully forgive me for abusing a line from his famous Hamlet. In my post, I won't be covering questions of life and death, but rather something much more prosaic - a lesser-known LINQ materialization method - ToLookup. We all know ...
How do you deal with out parameters inside of LINQ queries? Almost every time I come across the need to invoke a method inside of a LINQ query, which uses an out argument, I need to stop for a moment and think about what the correct solution is. And ...
Doing a left outer join in T-SQL is as straightforward as adding a single keyword to the JOIN statement. I remember that when I first tried to perform a left outer join in a LINQ query, I was honestly surprised about how confusing the syntax was. Eve...
Here's another LINQ gem, which is very useful if you plan to base your projection or filtering logic on the element's index in a sequence. From the MSDN page for Enumerable.Select(): Projects each element of a sequence into a new form by incorporati...
I'm always fascinated by how simple yet helpful LINQ queries are. Take for example the Enumerable.Zip() method. It's simple, yet very useful in case you need to combine two sequences of data. Here's a partial example where Zip() is used to combine a...