static void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e) { //Shut down if (logclient != null) { logclient.Dispose(); } Console.WriteLine("Program shutting down"); Environment.Exit(0); }
static void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e) { _source.Dispose(); Console.WriteLine("Program terminated"); }