Application.ThreadException issue

  • Thread starter Thread starter Andy
  • Start date Start date
A

Andy

Hi,

This may seem obvious, but I just want to be sure.

I have my Program.cs, which executes a bunch of code prior to
executing Application.Run( mainForm ).

My question is this; right away, I hook an event handler to
Application.ThreadException. If an exception occurs BEFORE
Application.Run, should the event handler still fire if there's an
unhandled exception? Or will it only fire once Application.Run is
invoked?

Thanks
Andy
 
Not sure but you can always try throwing an exception or performing a divide
by 0 after you hook up the event but before you call Application.Run();
 
Back
Top