Previously, we looked at demystifying LINQ method syntax, including Where, OrderBy, and SingleOrDefault. The Join method looks a bit more complicated – 4 generic types and 5 parameters. But when we take a closer look, we see that we’ve already dealt with the pieces in similar methods. We’ll take a closer look to fully understand […]
Lambda Expressions have a really cool feature called “captured variables”. This is very useful (as we saw in Part 1), but it can also be dangerous if we try to capture the indexer of a “for” loop. Today we’ll see the problem in action, and we’ll also look at a really easy solution. For code […]
We’re used to imperative programming in C# — this is where we tell the computer *how* to accomplish a task. With declarative programming, we tell the computer *what* we want and let it figure out the details. This can make our code much easier to read and understand. And LINQ can help us get there. […]
LINQ (Language Integrated Query) is an amazingly powerful tool. But the method signatures are confusing. Today we’ll look at the syntax of the LINQ methods, learn to decipher the parameters and return values, and also see how lambda expressions play a key role in calling these methods. Once we understand this, LINQ becomes extremely simple […]