Oreilly - Mastering Events and Delegates in C#
by Rod Stephens | Released June 2016 | ISBN: 9781491962671
Simple event handlers that do things like make buttons and menu items perform actions, are commonly used by even novice C# programmers. The concept of delegates can seem more complicated and is often avoided by beginners for that reason. However, delegates are working behind the scenes and you are using them without realizing it every time you use events. A better understanding and more control of event handlers will come with a better understanding of delegates.In this course, C# wizard Rod Stephens reveals the relationship between delegates and events. He shows you how delegates function, and once that is clear he takes you on a tour of the advanced ways in which you can now work with events. Prerequisites for the course include some C# experience and a computer running Visual Studio 2015. Become a better C# programmer by understanding the relationship between delegates and events Learn to use delegate types pre-defined by the .NET framework, and define your own delegates Discover how to create delegate variables that let you manipulate methods as if they were data Learn how to use event handlers in Windows forms and WPF applications Understand how to define and raise events, and how to create and use routed events Explore tunneling, bubbling, and custom routed eventsRod Stephens, president of Rocky Mountain Computer Consulting, is the author of more than 30 books and 250 articles about various programming topics, including the O'Reilly titles Using Interfaces in C#, Learning Visual Basic .NET, and the C# 24-Hour Trainer. He's a professional developer with more than 20 years of experience with Visual Studio and a 13-year Microsoft MVP. Show and hide more Publisher resources Download Example Code
- Introduction
- Introduction And Course Overview 00:04:13
- About The Author 00:03:02
- How To Access Your Working files 00:01:15
- Using Delegates
- Delegates Defined 00:08:46
- Employee Processing Example 00:06:16
- Predefined Delegate Types 00:04:21
- Lambda Expressions 00:06:04
- Delegate Arithmetic 00:05:17
- Variance Part - 1 00:08:13
- Variance Part - 2 00:10:25
- Delegate Targets 00:05:39
- Using Event Handlers
- Event Handlers Defined 00:02:28
- Making Default Event Handlers 00:07:01
- Making Other Event Handlers 00:05:49
- Removing Event Handlers 00:07:17
- Event Handlers In WPF 00:05:34
- Event Handlers In Code 00:06:03
- Raising Events
- Defining And Raising Events 00:05:51
- Event Parameter Standards 00:07:34
- Raising Base Class Events 00:06:44
- Using Return Parameters 00:06:15
- Event Accessors 00:06:21
- Specialized Events 00:08:23
- Using Routed Events
- Routed Events Defined 00:06:22
- Routed Event Conversion 00:05:14
- Custom Routed Events 00:07:22
- Conclusion
Show and hide more