Summary

Chapter 8 demonstrated the fundamental concepts of declaring, raising, and handling events. You can declare event members in classes, structures, and modules in Visual Basic .NET. Event handlers for structures and modules must be assigned with the AddHandler statement, whereas WithEvents and Handles or AddHandler can be used to associate event handlers with class events.

Event handlers are basically procedural types. Visual Basic .NET implements and supports procedural types and event handling as a special class, Delegate. Chapter 8 touched briefly on the concept of delegates and multicast delegates, and Chapter 9 will provide more information and advanced techniques for employing delegates.

Get Visual Basic® .NET 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.