how to hold a console application open

  • Thread starter Thread starter Ron
  • Start date Start date
Hi Ron,

Could you explain a bit more what you mean by holding it open?
The program ends when the end of Main is reached.
Use some kind of loop to keep it going.

while(not finished)
{
}
 
Well, I think I found one way

String s;
s = Console.ReadLine();

If there is any other way or a preferred way, I appreciate
any suggestions.
 
If you mean the console window from hitting F5 in Visual Studio you can do
CTRL-F5 instead to prevent the window from closing after it is finished
running.
 
Thanks. Ctrl-F5 is what I was looking for.

-----Original Message-----

If you mean the console window from hitting F5 in Visual Studio you can do
CTRL-F5 instead to prevent the window from closing after it is finished
running.
 
Back
Top