2015
Lynda
Joe Marini
1:09
English
C# has the ability to create functions to fit a variety of scenarios, via delegates, events, and lambda functions. Join Joe Marini in this course for an exploration of these key elements, starting with delegates. As Joe explains, delegates allow developers to call functions in a way that allows for swapping while the program is running. He'll show how to create both anonymous and composable delegates to perform practical tasks, such as calculating shipping costs. Next, he'll cover using events to broadcast and listen to messages both inside and outside a program, switching functionality on and off on demand. Finally, Joe will explore lambda functions: concise ways to declare small and focused or one-off functions, which keep code tight and efficient.
Start watching to learn how to adapt this flexible set of programming tools to your own C# programming needs.
Introduction
Welcome
What you should already know
Using the exercise files
Setting up the development environment
1. Overview
Overview of C# delegates, events, and lambdas
Common delegate, event, and lambda scenarios
2. C# Delegates
Creating C# delegates
Using anonymous delegates
Using composable delegates
Programming challenge: Calculate shipping costs
Solution
3. C# Events
Creating C# event handlers
Event chaining and unchaining
Programming challenge
Solution
4. C# Lambda Expressions
Understanding C# lambdas
Using lambdas as delegates
Programming challenge
Solution
Conclusion
Goodbye
Download File Size:201.91 MB