How to terminate .NET application on a specific exception - possibly without stack unwinding?
问题 I have a .NET application (service) that consists of C# and C++ code. "Crashes" (i.e. System.AccessViolationException and other Corrupted State Exceptions) in the C++ Code will be ("non-") handled correctly, they will directly lead to my AppDomain.CurrentDomain.UnhandledException handler (which logs) and then the application will terminate, writing a WER dump file if so configured (which it is). For this application, I have determined that System.NullReferenceException is always a bug,