how to stop automaticly closing of c# console application? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

how to stop automaticly closing of c# console application?

when l run my program it's closed suddenly!

28th Dec 2018, 12:21 PM
Mahdi Mohebali
Mahdi Mohebali - avatar
2 Answers
+ 5
You can add Console.ReadKey(); at the end of your code.
28th Dec 2018, 12:31 PM
Michal
Michal - avatar
+ 2
Start the application with ctrl-F5 instead of F5.
28th Dec 2018, 8:53 PM
sneeze
sneeze - avatar