O'Reilly logo

C# 5.0 Unleashed by Bart De Smet

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

The Two Sides of Delegates

Delegates really have two sides to them. One side defines one or more target methods referred to by the (multicast) delegate; the other defines a way to invoke those methods through the delegate. To keep things clear, let’s define a little bit of vocabulary here. We’ll say a target method gets called, whereas a delegate is getting invoked. With those words in place, we can sketch our current understanding of delegates as shown in Figure 18.1.

Image

FIGURE 18.1 Invoking a delegate is an interactive act.

When we look at the picture from left to right, delegates look like very interactive beasts, where the invocation site is ...

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