First my question:
How can I put some code that will be executed when the OS is shutdown?
----
Then what I have done:
I read about SessionEnding, if I add an event handler to
I can do that.
I found this in https://books.google.co.jp/books?id...MAc#v=onepage&q=SessionEnding example&f=false
C# Cookbook page 772
However, how can I debug a program through a shutdown?? I tried and visual studio failed with the message
"A process used by visual studio has encountered an unrecoverable error, we recommend saving your work and then closing and restarting visual studio"
Any help will be greatly appreciated
How can I put some code that will be executed when the OS is shutdown?
----
Then what I have done:
I read about SessionEnding, if I add an event handler to
C#:
SystemEvents.SessionEnding
I found this in https://books.google.co.jp/books?id...MAc#v=onepage&q=SessionEnding example&f=false
C# Cookbook page 772
However, how can I debug a program through a shutdown?? I tried and visual studio failed with the message
"A process used by visual studio has encountered an unrecoverable error, we recommend saving your work and then closing and restarting visual studio"
Any help will be greatly appreciated