Exploring Existing Delegate Types

You will encounter several existing delegates as you continue learning more about VB .NET. It is important to keep in mind that these delegate types are constrained by the procedure signatures used to define them. Determine the signature and you will know the kind of data passed when the delegate is invoked. You can easily rely on the help system to provide you this information on a case-by-case basis.

Rather than try to provide you with a comprehensive list, I will mention two very common delegates here briefly. The first is EventHandler, and the second is PaintEventHandler.

Both EventHandler and PaintEventHandler have a first argument in common, sender, defined as an Object type. The sender argument is usually ...

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