My .NET 5 console application registers a HandlerRoutine by using SetConsoleCtrlHandler, so it can do some cleanup before exiting. This allows me to react to CTRL+C
CTRL+C