"Ro********@yahoo.co.uk" <Ro********@yahoo.co.uk> wrote:
Hi, Using Console.Writeline, as
while ((strLine = stream.ReadLine()) != null)
{
sb.Append(strLine);
Console.WriteLine(strLine);
} this writes all the data to the screen at one go. Is there away to
write one line at a time.
This loop does, in fact, write one line at a time. To make it more
readable, perhaps you should either:
1) Redirect output to the 'more' command or a text file
or
2) Increase the size of your console buffer (Command Prompt properties)
or
3) Insert occasional "Press enter to continue" via:
---8<---
int lineCount = 0;
while ((strLine = stream.ReadLine()) != null)
{
sb.Append(strLine);
Console.WriteLine(strLine);
if (++lineCount % 24 == 0)
{
Console.Write("Press Enter to continue...");
Console.ReadLine();
}
}
--->---
-- Barry