Getting control of program exits

  • Thread starter Thread starter Dick Berthold
  • Start date Start date
D

Dick Berthold

Is there a way to get control when a program exits? I am working with a
large multi-threaded .NET Basic application which is "randomly" shutting
down. Ideally, I would like to write some sort of log file when it exits
giving as much as possible information about the reason for the exit.
 
Dick Berthold said:
Is there a way to get control when a program exits? I am working with a
large multi-threaded .NET Basic application which is "randomly" shutting
down. Ideally, I would like to write some sort of log file when it exits
giving as much as possible information about the reason for the exit.

You could try adding a handler to the AppDomain.Unload event.
 
Back
Top