+ 5
I tried doing exactly what is in the tutorial but it exit right after.
exit
7 Respostas
+ 4
That's because the body of your code comes to an ending, if you are using Visual Studio, as soon as all your code is compiled it will close the application. In order to avoid that, simply add an Console.ReadKey(); to the end of your code scope, it will remain till you press a key to close it.
+ 1
hey... write.. console.readkey in the end... it will keep the console window open
+ 1
If you are using visual studio. You can run your program without debugging to prevent from closing. Just press control + f5 to test your program 😄
0
Or run it without debugging. it will leave the window open after the code has finished.