摘要:
C#处理控制台关闭的时候调用了public delegate bool ConsoleCtrlDelegate(int ctrlType);[DllImport("kernel32.dll")] private static extern bool SetConsoleCtrlHandler(ConsoleCtrlDelegate myHandler, bool add);static Main(){ConsoleCtrlDelegate consoleDelegete = new ConsoleCtrlDelegate(MyHandler);SetConsoleCtrlH 阅读全文