How to keep the console open (C#) *Best for new beginners

All tutorials created in C# to be posted in here.
2 posts Page 1 of 1
Contributors
User avatar
thekingajew
Just Registered
Just Registered
Posts: 3
Joined: Thu Oct 31, 2013 6:46 am

For the very first time you start to code you will be told to start with an introduction e.g. welcome to my console, But what you will find is the console will close straight away with out running the program.

Since there was not a post here i would make a quick tutorial as this will be most beneficial to new people learning C# :)

Image
image upload no ads

Use these 2 lines of code to keep the console open, This code can be modified within the ("")
Code: Select all
//This is how to stop the console closing
            Console.WriteLine("Press key to close ... ");
            Console.ReadKey();
If this was any help why not check my site? Http://free4later.com
Last edited by thekingajew on Tue Feb 18, 2014 11:43 am, edited 1 time in total.
If ive helped you why not help me? http://www.points2shop.com?ref=thekingajew
User avatar
M1z23R
VIP - Donator
VIP - Donator
Posts: 622
Joined: Tue Sep 28, 2010 4:55 pm

When you are debugging you can just debug with "CTRL+F5" and it will stay open ;)
2 posts Page 1 of 1
Return to “C-Sharp Tutorials”