public static void SetHandler(ConsoleControl.Handler handler)
 {
     ConsoleControl.SetConsoleCtrlHandler(handler, true);
 }
 private static extern bool SetConsoleCtrlHandler(ConsoleControl.Handler handler, bool Add);