Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi folks,

I have seen few video tutorials for C# programming. In that I noticed that they are not using Console.Readline() to pause the console screen and the application is running through Command prompt. I am using Visual Studio Express 2013, how I can do the same ?. I know this is not important anyway please help me on this.

-Manuprasad M
Posted
Comments
Suvendu Shekhar Giri 6-Aug-15 0:35am    
Who restricted you to write Console.Readline()?
Debugging is something different, check these articles-
Mastering Debugging in Visual Studio 2010 - A Beginner's Guide[^]
http://www.dotnetperls.com/debugging[^]
https://msdn.microsoft.com/en-us/library/y740d9d3.aspx[^]
Manu Prasad 6-Aug-15 0:57am    
Hi sorry, my question is little confusing. I just want to pause the console screen without using Console.Readline() or break points. As I told I just want to know how to use command prompt window for printing console outputs.
And I seen that in almost all tutorials.

1 solution

Following are the ways you can view the console screen without using Console.Read(), Console.ReadLine() or Console.ReadKey().

1. Instead hitting F5 key or clicking Start in Visual Studio, press CTRL + F5. This will keep the output window open.
2. Sleep thread for few seconds.
C#
System.Threading.Thread.Sleep(2000); //this will make the control to wait for 5 seconds


Hope, it helps :)
 
Share this answer
 
Comments
Manu Prasad 6-Aug-15 1:38am    
Yeah!!, Got it CTRL+F5 .....Smile | :) Smile | :) Smile | :)
Suvendu Shekhar Giri 6-Aug-15 1:42am    
Thanks :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900