How to stop C# console applications from closing automatically?

Zignd picture Zignd · Jul 16, 2012 · Viewed 577.4k times · Source

My console applications on Visual Studio are closing automatically, so I'd like to use something like C's system("PAUSE") to "pause" the applications at the end of its execution, how can I achieve that?

Answer

Adam picture Adam · Jul 16, 2012
Console.ReadLine();

or

Console.ReadKey();

ReadLine() waits for , ReadKey() waits for any key (except for modifier keys).

Edit: stole the key symbol from Darin.