C
C#4w 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
SiphrnOP4w ago
Pls help
Angius
Angius4w 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 ✿
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
SiphrnOP4w ago
Thank you
Want results from more Discord servers?
Add your server