How do I prevent a console application from closing immediately?

You have two options.
You run the application without debugging (instead of F5 press
CTRL+F5). Or, if you don’t want to run the application without the debugger, at the end of the application code add:


Console.ReadLine()
Then you end the program by pressing Enter.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top