Pause console output

D

Dan Williams

Does anyone know if its possible to pause the console output if my console
app tries to write data past the current command prompt buffer?

In other words, behave much like the 'more' command, in that it stops
outputting and waits for the user to hit space to display the next pages
worth, or enter for the next line?

Thanks in advance for any suggestions.

Dan.
 
N

Noah Coad [MVP .NET/C#]

Use Console.ReadLine() to pause. You'll have to put in the logic to pause
every 25 lines or so if you have more lines of output.

- Noah Coad -
Microsoft MVP
 
D

Dan Williams

Use Console.ReadLine() to pause. You'll have to put in the logic to pause
every 25 lines or so if you have more lines of output.

- Noah Coad -
Microsoft MVP
OK, cheers. I'll give it a go.

Is there anyway to get the buffer size of the console/command window, then
i can use that in my logic?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top