The basic method used by the Vb stuff is to wrap the call to Application.Run
(usually found in Main()) in a try catch block. Then in the catch fire the
event you handle with the event args allowing you to choose to close or not.
After raising the event, if the arguments say to exit then it calls
Application.Exit();
There is no automatic way of doing this in C# but it would only take a few
minutes to code up and it could work the same way.
HTH
Ciaran O'Donnell
"tchu" wrote:
I found that in VB.Net, My.Application.UnhandledException can cancel the
exception handling by setting the ExitApplication property of
UnhandledExceptionEventArgs parameter to false.
Can the same thing be done in C#?
regards,
tchu