Introduction

There are few truly new innovations. Babbage and Turing were describing computers decades ago. Delegates are not completely new either. Delegates are an evolutionary revision to some pretty old concepts. ("Pretty old" is relative. In the computer industry, anything more than a few years old is pretty old.) When you have a good grasp on what is familiar about delegates, you will find it quite an easy task to learn what has evolved.

Very plainly, delegates are events wrapped up in classes. Objects in Windows (or any event-driven operating system) rely on three fundamental concepts: properties, methods , and events. Events support some powerful programming models. Hence it makes perfect sense that the event-handling model in VB .NET needed to evolve ”and it has. Events exist and are associated with special classes referred to as delegates.

In this chapter we look at how to declare and raise events and how delegates provide a more robust implementation of the event-handling model.



Visual Basic. NET Power Coding
Visual Basic(R) .NET Power Coding
ISBN: 0672324075
EAN: 2147483647
Year: 2005
Pages: 215
Authors: Paul Kimmel

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net