Handling Events

Events are members that enable objects to send information on their state to the caller. When something occurs, an event tells the caller that something occurred so that the caller can make decisions on what actions to take. You handle events in UI-based applications, although not always. The .NET Framework takes a huge advantage from delegates to create event infrastructures, and this is what you can do in creating your custom events. In this section you first learn how to catch existing events, and then you get information on creating your own events. This approach is good because it provides a way to understand how delegates are used in event handling.

Get Visual Basic 2015 Unleashed 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.