Example #1
0
 // the delegate is based upon the function, no matter what the class is.
 //  the method can from different classes. but must in the same namespace of the delegation.
 public void run(OnLaunchHandler handler)
 {
     handler();
     Console.WriteLine("Car is running");
 }
Example #2
0
        public void Run(OnLaunchHandler handler)
        {
            handler();

            Console.WriteLine("I can run.");
        }