Chapter 10. Events and Delegates

IN BRIEF

When developers made the switch from functional programming to object-oriented programming, many things became easier. The Win32 development model relies heavily on the concepts of function pointers and callbacks. In other unmanaged languages, the use of function pointers can be fraught with errors caused by type conversions. Most developers who are familiar with pointer programming are also familiar with the fact that type conversions are always a source of pain and stress.

One of the advantages of C# is how operations related to type conversion can be protected. C# doesn't support pointers to functions, but it does enable developers to use delegates and events for the implementation of callbacks and ...

Get Microsoft® Visual C#® .NET 2003 Unleashed 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.