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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top