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.
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





