Combining delegates Multiple delegates are combined using the Combine method, the plus operator (+), or the += assignment operator. : delegate « Language Basics « C# / C Sharp
Combining delegates Multiple delegates are combined using the Combine method, the plus operator (+), or the += assignment operator.
using System;
public delegate void DelegateClass(); public class Starter { public static void Main() {
DelegateClass del = MethodA;
del += MethodB;
del();
} public static void MethodA() {
Console.WriteLine("MethodA...");
}
public static void MethodB() {
Console.WriteLine("MethodB...");
}
}