Console application stopping at end

  • Thread starter Thread starter tshad
  • Start date Start date
T

tshad

I noticed that when I run my program from "Start without Debugging", it will
stop and wait for a key to struck.

If I run my progoram from must "Start" it will not stop and will close the
console window when finished. The same thing if I just run the program from
a command line.

Why is that?

Is there something in the Properties that causes it to work this way?

I am going to run this from the Schedular and don't want it to stop at all.

Thanks,

Tom
 
I am somewhat new but... It is my understanding that a console application
will close and take the cosole window with it once it has finished with its
execution routine(s).

One thing I do in order to get around this is and keep the console window
up, requireing user input is to use the following line of code at the very
end of the code block:

Console.Read()

All this line will do is prevent the console window from automatically
closing, it will not cause the code to loop or anything else.

I don't know what you have your code doing...

But drop this in as the last line and see if it provides the result your
looking for.

Thanks-

Tony Wissler
 
Back
Top