© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
G. ByrneTarget C#https://doi.org/10.1007/978-1-4842-8619-7_22

22. Events

Gerard Byrne1  
(1)
Belfast, Ireland
 

Concept of Events

Publisher and Subscriber

In the last chapter, we learned about delegates, which when created allow us to pass a method as a parameter to other methods. A delegate is really a class that encapsulates a method signature. We saw how to create a delegate, reference it to a method, and then invoke the delegate, which therefore calls the method. We saw that we could chain delegates so we could call multiple methods and this has the name multicast delegates. In this chapter we will look at events, and delegates are intrinsically linked ...

Get Target C#: Simple Hands-On Programming with Visual Studio 2022 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.