Skip to main content

Delegates and Events

  • Chapter
Accelerated VB 2008
  • 260 Accesses

Abstract

Delegates provide a built-in, language-supported mechanism for defining and executing callbacks. Their flexibility allows you to define the exact signature of the callback, and that information becomes part of the delegate type itself. Anonymous functions are forms of delegates that allow you to shortcut some of the delegate syntax that, in many cases, may be overkill. Building on top of delegates is the support for events in Visual Basic (VB) and the .NET platform. Events provide a uniform pattern for hooking up callback implementations, and possibly multiple instances thereof, to the code that triggers the callback.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 39.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Guy Fouché and Trey Nash

About this chapter

Cite this chapter

(2008). Delegates and Events. In: Accelerated VB 2008. Apress. https://doi.org/10.1007/978-1-4302-0339-1_11

Download citation

Publish with us

Policies and ethics