Handling exceptions for a whole application

In one of my C# Windows Forms Applications I had a problem whereby a third-party component was throwing an exception in another thread. The exception wasn’t causing any problems but it wasn’t being handled by anything.
Basically I wanted to catch the exception, log it for reference and possible future investigation, and then ignore it and carry on.

I started by adding event handlers to the exception events:

And then I added log4net to simply log the error and move on (added via NuGet Package Manager)

So my app.config had the following added:

And my main Program.cs ended up looking like this:

Job done!