Skip to main content
A multicast delegate in C# is a delegate object that holds references to multiple methods within a single invocation list. When the multicast delegate is invoked, it executes all the methods in its invocation list synchronously, in the exact order they were added. Under the hood, all C# delegates implicitly inherit from the System.MulticastDelegate class, which in turn inherits from System.Delegate. You construct a multicast delegate by combining individual delegate instances using the overloaded + or += operators. Conversely, you remove methods from the invocation list using the - or -= operators.

Architectural Characteristics

Immutability Delegate instances in C# are immutable. When you use the += operator, the compiler translates this into a call to Delegate.Combine(). This method does not mutate the existing delegate; instead, it allocates and returns a completely new delegate instance containing the merged invocation lists. The -= operator similarly calls Delegate.Remove(), returning a new instance with the specified method omitted. Return Value Resolution While multicast delegates typically define a void return type, they are permitted to return values. If a multicast delegate has a non-void return type, the caller receives the return value of the last method executed in the invocation list. The return values of all preceding methods are evaluated but discarded.
Exception Propagation Because a multicast delegate processes its invocation list sequentially, an unhandled exception thrown by any method in the list will immediately halt execution. The exception propagates up the call stack to the invoker, and any subsequent methods remaining in the invocation list are not executed. Manual Invocation Control To bypass default behaviors—such as capturing all return values or preventing a single exception from halting the entire chain—you can manually iterate through the invocation list using the GetInvocationList() method. This method returns an array of System.Delegate objects representing the individual methods.
Tired of Poor C# Skills? Fix That With Deep Grasping!Learn More