Back to results for “Delegates”
C# › Delegates, Events & Lambdas

What are multicast delegates, and in what order do their subscribed methods get invoked?

Intermediate

Answer

A delegate can hold references to MULTIPLE methods simultaneously (added via +=), forming an invocation LIST — calling the delegate invokes every subscribed method IN THE ORDER they were added, one after another, sequentially on the same thread.
Action greetings = null;
greetings += () => Console.WriteLine("Hello");
greetings += () => Console.WriteLine("Hi");
greetings += () => Console.WriteLine("Hey");
greetings?.Invoke(); // prints Hello, Hi, Hey in that order
Real-world example Allowing multiple independent parts of an application to subscribe to and react to the same event, like a logging system and a UI update both reacting to OnDataChanged.

Common follow-ups: What happens to the RETURN VALUE if a multicast delegate has a non-void return type and multiple subscribers?