C
C#2mo ago
Siphrn

Console auto closes instantly when i run the program

I made a geolocater, and once i type in the IP, it breifly shows all the info but then the console IMMEDIATEly closes and the program ends. how do i fig this?
4 Replies
Siphrn
SiphrnOP2mo ago
Pls help
Angius
Angius2mo ago
Add Console.ReadLine() at the end It will only close after you press enter Or Console.ReadKey() and it will close after you press any button Or change the setting in VS. Can't remember which one it is, but there is one that prevents the console from closing
✿ Scarlet ✿
✿ Scarlet ✿2mo ago
Adding: if you want to make an exitless program you can also use while (true) {} That is not usually recommended but will hang your program until an external close action.
Siphrn
SiphrnOP2mo ago
Thank you
Want results from more Discord servers?
Add your server