Level: Introductory to Intermediate
Delegates are waiting to make our code more flexible and extensible. I'll take a look at what delegates are and dispel the mystery of the built-in Func and Action delegate types. Jumping into code, I'll use them to make classes more flexible and even use multi-casting to kick off a series of operations with a single call. Along the way, you'll see that lambda expressions can add readability to your code (yes, I actually said that). And this is a great jumping-off point for heading into LINQ, parallel programming and functional programming.
You will learn:
- What delegates are
- How to use delegates for extensibility
- How to get a handle on Func, Action and lambda expressions