Do anyone know how to make a C# console application not to end when the code have beed run.
I start a listning socket in my application but when the application
reach the end of the code the application ends.
:)
Printable View
Do anyone know how to make a C# console application not to end when the code have beed run.
I start a listning socket in my application but when the application
reach the end of the code the application ends.
:)
System.Windows.Forms.Application.Run(); will do it stick that before the end of the Main routine.
VB Code:
Console.ReadLine();
You have to request input to hold the console open. Its basically like the 'Press enter to exit' idea (but don't press enter).
Quote:
Originally posted by Edneeis
VB Code:
Console.ReadLine();
You have to request input to hold the console open. Its basically like the 'Press enter to exit' idea (but don't press enter).
Thanxs!!!!
or run in not debug mode...that way it wont close :D
Thanxs!..