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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights 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
DOI: https://doi.org/10.1007/978-1-4302-0339-1_11
Publisher Name: Apress
Print ISBN: 978-1-59059-874-0
Online ISBN: 978-1-4302-0339-1
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)