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

Combining Delegates

In preparation for the discussion about events in Chapter 18, I want to mention one more thing about delegates: their capability to be used in a “multicast setting.” Earlier on, you saw how delegate types in C# derive from a base class called MulticastDelegate. Looking at that type’s information in Visual Studio, you see how that type by itself derives from Delegate:

namespace System{    public abstract class MulticastDelegate : Delegate    {        ...

Looking a bit further at the members of the MulticastDelegate type, you’ll notice one that reveals its true essential goal, allowing multiple target methods to be called as part of the delegate’s invocation call. This is hinted at in Figure 17.27 ...

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