Reputation: 1725
Hello I got 2 question :
1) What event occours when the application crash? I need to invoke Dispose to resolve resources so how to do that when app crashes?
2) How to Dispose when we kill aplication procces through ALT+CTR+DELETE?
Upvotes: 1
Views: 2130
Reputation: 1243
1) there are two event handlers:
Dispatcher.UnhandledException += Dispatcher_UnhandledException;
All unhandled exceptions in UI thread.
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
All other exceptions ...
2) there is no way to catch the situation when your app is killed through ALT+CTR+DELETE The only Idea I can think of... create a watch dog app that checks the status of main app...
Upvotes: 4