O'Reilly logo

ADO.NET Programming in Visual Basic™ .NET by Bob Howell, Steve Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Events and Delegates

Events are part of what we call the Callback Mechanism. One way of looking at OOP is by using a communications paradigm. Objects communicate with each other by sending and receiving messages. Messages are received using methods and properties. Messages are sent via callbacks or events. Classes can fire events anytime they want to notify any class that’s listening for some action. The class that’s listening for the event can then take appropriate action, or do nothing. Thus we can say that we have event senders and event listeners. Another more academic way of saying this is that there are event sources and event sinks. VB provides a very robust event system.

The first and most basic way of creating and using events is as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required