C# programs close after ran

I'm a beginner to C#, and my programs close after I run them!
What function do I use?
Try to run using ctrl + F5 but not only F5 (debug) !!
Err, you're in the wrong forum, bud. This is C++ not C#.

Anyway, in C++ most people can counter this problem with system("PAUSE"). There's another way, but I'm not sure what the code would be in C#.
Hope that helps.

Edit:
Actually, it'd be easier if you simply had your user enter 'exit' when they wish to exit, and then do an infinite loop of the function until the user wants to exit.
Last edited on
if you're working with console try this:
 
Console.ReadKey();
Topic archived. No new replies allowed.