Sunday, August 2, 2009

"C#" C-Sharp end program?

I've inherited a large C# program that I must maintain. It does not terminate cleanly and leaves it's process running. Termination of the process requires a ctl-alt-del to the task manager, and then a manual delete. How do I gracefully terminate this program?

"C#" C-Sharp end program?
Maybe at the end of the program place the statement:





Application.Exit();





This should work unless the program is spawning another process, if that's the case you could try to track down the process being spawned and follow it up with commands to terminate the process once it's done doing its thing.


No comments:

Post a Comment