Radio

Catch and handle all unhandeled exceptions

.NET allows you to catch and handle any unhandled exception that occurs in your program. By an unhandled exception I mean one that is not caught by a Try-Catch statement.
Good error handling is critical and the best bet is to use Try-Catch-Finally blocks. However, using the current Application Domain you can catch any error that occurs outside of a Try-Catch block. An application domain is an isolated environment where an application executes. Application domains provide isolation, unloading, and security boundaries for executing managed code. Basically, they prevent one application from interferring with another. Applications Domains are represented by the AppDomain object.
To catch unhandled errors, you need to get the current application domain, set up two event handler routines and add two event handler definitions.