Subscribe to the AppDomain.CurrentDomain.ProcessExit event - this gets fired
when the application is terminating cleanly and while all system components,
appdomains, etc. are still functional.
"Peter Steele" <ps*****@z-force.com> wrote in message
news:Ol**************@TK2MSFTNGP10.phx.gbl...
I want to trap any attempts to kill my C# application and so that I can
execute shutdown code and let the app die gracefully. How can this be done?