C#10 Videos

C# Generics – Part 1: Collections

Let the compiler work for you. Generics shift the burden of type-safety from the developer to the compiler. We’ll start exploring Generics by looking at .NET Collections. For code samples and a PDF Walkthrough, visit http://www.jeremybytes.com/Demos.aspx…. Future videos will explore other aspects of Generics (including interfaces, methods, and constraints).

C# Generics – Part 3: Methods & Delegates

Let the compiler work for you. Generics give us flexibility and reuse in our classes, methods, and interfaces. This time, we’ll explore Generics by looking at Methods and Delegates. For code samples and a PDF Walkthrough, visit http://www.jeremybytes.com/Demos.aspx…. Future videos will explore other aspects of Generics (including nested generics and constraints).

C# Generics – Part 4: Nested Generics

Let the compiler work for you. Generics give us flexibility and reuse in our classes, methods, and interfaces. This time, we’ll explore Generics by combining the Generic Interface (from Part 2) with the Generic Method (from Part 3). We end up with a Nested Generic. For code samples and a PDF Walkthrough, visit http://www.jeremybytes.com/Demos.aspx…. Future […]

C# Generics – Part 5: Generic Constraints & “default”

Let the compiler work for you. Generics give us flexibility and reuse in our classes, methods, and interfaces. This time, we’ll explore Generics Constraints and the “default” keyword. Constraints allow us to place conditions on what types can be used as generic parameters. For code samples and a PDF Walkthrough, visit http://www.jeremybytes.com/Demos.aspx.

Lambdas & LINQ in C# – Bonus: Captured Variables & for Loops

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 […]

Lambdas & LINQ in C# – Bonus: Deciphering the Join Method

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 […]

Lambdas & LINQ in C# – Part 1: Lambda Expression Basics

Lambda Expressions are confusing when we first walk up to them. But they’re pretty easy to understand once we take a bit of a closer look. Today we’ll look at the syntax features and also captured variable. When we’re comfortable with lambda expressions, we can use them to take advantage of LINQ (Language Integrated Query) […]

Lambdas & LINQ in C# – Part 2: Demystifying LINQ Methods

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 […]

Lambdas & LINQ in C# – Part 3: Declarative Programming with LINQ

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. […]