예제 #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("***** Method Group Conversion *****\n");
            Car c1 = new Car();

            c1.RegisterWithCarEngine(CallMeHere);

            Console.WriteLine("***** Speeding Up *****");
            for (int i = 0; i < 6; i++)
                c1.Accelerate(20);
            c1.UnregisterWithCarEngine(CallMeHere);

            for (int i = 0; i < 6; i++)
                c1.Accelerate(20);

            Console.ReadLine();
        }