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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.232.239