ykh ykh - 4 years ago 178
C# Question

WinForms Global Exception Handling?

I have implemented a software which have a DLL library which contains a huge set of classes which includes all the methods for my software.

Now i want to be able to handle some global errors like error #26 which is a no Network Related Error on all these classes instead of going to each class and add it. How to do that ?

Answer Source

I #26 is an exception then you can use AppDomain.CurrentDomain.UnhandledException event. If it's just a return value, then I won't any chance to handle that globally.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download