O'Reilly logo

CLR via C#, Fourth Edition by Jeffrey Richter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 17. Delegates

In this chapter:

A First Look at Delegates

Using Delegates to Call Back Static Methods

Using Delegates to Call Back Instance Methods

Demystifying Delegates

Using Delegates to Call Back Many Methods (Chaining)

Enough with the Delegate Definitions Already (Generic Delegates)

C#’s Syntactical Sugar for Delegates

Delegates and Reflection

In this chapter, I talk about callback functions. Callback functions are an extremely useful programming mechanism that has been around for years. The Microsoft .NET Framework exposes a callback function mechanism by using delegates. Unlike callback mechanisms used in other platforms, such as unmanaged C++, delegates offer much more functionality. For example, delegates ensure that the callback method ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required