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 events
Rod 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.