I’m trying to crash LINQPad4 using the following C# statement:
new Thread(() => new Thread(() => { throw new Exception(); }).Start()).Start();
An unhandled exception dialog is shown, but the process doesn’t die. I suppose IsTerminating = true like in all UnhandledThreadExceptions… how does it stop the process from dying?
it has a global exception handler for all non UI thread exceptions as well, something like this in the Main method:
there are also other small things to do of course plus as usual the try/catch around the Application.Run.
see a full article and details here: C# Tutorial – Dealing With Unhandled Exceptions
Edit: hb. try to debug this one: 😉