Exemplo n.º 1
0
        static void Main()

        {
            // Add event handlers to Show event.
            _show += new Program.EventHandler(Cat);
            _show += new Program.EventHandler(Dog);
            _show += new Program.EventHandler(Mouse);
            _show += new Program.EventHandler(Mouse);


            // Invoke the event.
            //d1.Invoke();
            //if (_show != null) {
            //    _show();
            //}

            _show?.Invoke();
        }
Exemplo n.º 2
0
 private static extern bool SetConsoleCtrlHandler(Program.EventHandler handler, bool add);