Solved

Pause the console display when running a console app

Posted on 2004-09-15
3
260 Views
Last Modified: 2011-09-07
So sorry to ask this but I'm totally new to .NET and don't know what to look under in help.  I have an application that consists of one entire statement, Console.Writeline("hello").  It flashes so quickly at runtime, I can't read it.  I don't see a pause option????

Thanks : )
0
Comment
Question by:FatalErr
3 Comments
 
LVL 15

Accepted Solution

by:
Timbo87 earned 125 total points
ID: 12071239
Add Console.ReadLine()

If you want to spruce it up a bit:

Console.WriteLine("Press enter to continue...")
Console.ReadLine()
0
 
LVL 18

Expert Comment

by:armoghan
ID: 12071714
Or if you do not want user input you can use

Thread.Sleep(1000) to sleep the current thread for sometime
0
 
LVL 1

Author Comment

by:FatalErr
ID: 12077629
Thank you both.  Will use Timbo87's answer for now.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question