예제 #1
0
파일: Program.cs 프로젝트: roshkov/DNP_3Sem
        static void Main(string[] args)
        {
            notifier not = SayHello;

            not("Pidor");

            not = SayGoodbye;
            not("Pidor");
        }
예제 #2
0
        static void Main(string[] args)
        {
            String    name      = Console.ReadLine();
            Delegates delegates = new Delegates();
            notifier  notifier1 = delegates.SayHello;

            notifier1(name);
            notifier notifier2 = delegates.SayGoodbye;

            notifier2(name);
            notifier1 += delegates.SayGoodbye;
            notifier1(name);
        }