C#: Delegates, Events, and Lambdas
1h 7mIntermediate2023-12-14
Authors

Joe Marini
Senior Developer Advocate at Google, Developer
Course details
C# provides different function types to fit a variety of real-world development scenarios. In this course, Joe Marini explores three important features of C#: Delegates, events, and lambdas. First, Joe shows how delegates are used to provide interchangeable functions during the lifetime of a program, which makes it easy to modify the functionality of an app on the fly. He then covers events, which are used to handle messages from both within and outside the program and can be turned on and off dynamically. Finally, he shows how lambdas provide a concise, efficient way of writing simple expressions without having all the associated syntax of a full function. These features help keep C# code readable, efficient, and maintainable, so join Joe to learn how to adapt this flexible set of programming tools to your own C# programming needs.
Skills covered
C#Programming LanguagesMicrosoftSoftware DevelopmentDeep Dive (X:Y)
Concepts
0. Introduction
- 01 - Using C# delegates, events, and lambdas
- 02 - What you should know
- 03 - Exercise files on GitHub
- 04 - Setting up the developer environment
1. Getting Started
- 05 - Overview of C# delegates, events, and lambdas
- 06 - Common delegate, event, and lambda scenarios
2. C# Delegates
- 07 - Creating C# delegates
- 08 - Using anonymous delegates
- 09 - Using composable delegates
- 10 - Challenge - Programming delegate
- 11 - Solution - Programming delegate
3. C# Events
- 12 - Creating C# event handlers
- 13 - Event chaining
- 14 - Challenge - Programming events
- 15 - Solution - Programming events
4. C# Lambdas
- 16 - Understanding C# lambdas
- 17 - Using lambdas as delegates
- 18 - Challenge - Programming lambdas
- 19 - Solution - Programming lambdas
Conclusion
- 20 - Where to go next
Related courses
Related learn paths
- Elevating C# Skills: Building Robust Applications
- Getting Started as a C# Developer
- C# Foundations: From Basics to Building Blocks
- C# Excellence: Architecting High-Performance Solutions
- Master C++
- Advance Your Skills in C++
- Getting Started with C++
- C++ Programming Professional Certificate by OpenEDG C++ Institute