Delegates
When the architects of the .NET Framework team began to design their new platform, they knew they wanted to provide rich support for implementing callbacks. They weighed the pros and cons of implementing callback methods in terms of interfaces versus implementing them in terms of function pointers. In the end, the.NET Framework architects decided to create a hybrid technique that combines the type safety and polymorphism of interfaces with the efficiency and flexibility of function pointers. This innovation relies on the use of delegates.
A delegate is a special kind of type within the programming model of the .NET Framework. The architects of the .NET Framework added delegates to provide a convenient binding mechanism to connect one ...
Get Building Applications and Components with Visual Basic .NET 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.