Terminate Processing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm sure this must be a simple question... I am working on a Console
application and when I get into a certain situation and I want to terminate
processing is there a command that I can do to cause this to happen?
 
Jim,

For a console based app, I would call the static Exit method on the
Enviornment class.

Hope this helps.
 
Hi,

One option is to return to the Main() method from the processing method (if
this is one) and just do a return;
..
Other option is: Process.GetCurrentProcess().Close();

I'm sure this must be a simple question... I am working on a Console
application and when I get into a certain situation and I want to terminate
processing is there a command that I can do to cause this to happen?
 
Back
Top