My console applications on Visual Studio are closing automatically once the program finishes the execution. I’d like to "pause" the applications at the end of their execution so that I can easily check the output. How can I achieve that?
My console applications on Visual Studio are closing automatically once the program finishes the
Share
Update:
As of Visual Studio 2017, there’s a built-in option in the IDE at:
Unchecking it will automatically pause the application at the end of the execution, allowing you the easily check its output without having to add extra code to your application.
There are two ways;
ReadLine()waits for ↩or
ReadKey()waits for any key (except for modifier keys).