In many languages Delegates (pointers to function) can only point to single method. In C# we can make delegate to point multiple methods. When invoking such delegete, all metods that are assigned will be executed.

using System;

namespace Trace
{
    static class Foo
    {
        public static void Trace1(string a)
        {
            Console.WriteLine(a + "1");
        }
        public static void Trace2(string a)
        {
            Console.WriteLine(a + "2");
        }
        public static void Trace3(string a)
        {
            Console.WriteLine(a + "3");
        }
        public static void Trace4(string a)
        {
            Console.WriteLine(a + "4");
        }
    }

    public class Program
    {
        delegate void Write(string message);

        static void Main(string[] args)
        {
            Write w = new Write(Foo.Trace1);
            w += Foo.Trace1;
            w += Foo.Trace2;
            w += Foo.Trace2;
            w += Foo.Trace4;
            w += Foo.Trace3;
            w("a");

            Console.ReadKey();
        }
    }
}

 

a1
a1
a2
a2
a4
a3