Hi,
For displaying progress you can "hack" it by sending a carriage return (\r)
without new line (\n) thus overwriting the old value. Example:
static void Main(string[] args)
{
for(int i = 0; i < 100; i+=5)
{
Console.Write("\rProgress: {0}%\t\t\t", i);
System.Threading.Thread.Sleep(300);
}
Console.WriteLine("\rFinished\t\t\t\t\t");
Console.ReadLine();
}
For clearing completely the console window see:
http://support.microsoft.com/?kbid=319257
Hope this helps
Martin Dechev
ASP.NET MVP
"Josh" <jo**@rb.com.auREMOVETOEMAIL> wrote in message
news:uJ**************@tk2msftngp13.phx.gbl...
Hi Guys,
I have written a console application in C#. I wish to printout a
percentage to the screen as the program is running.
Does anyone know how to clear the console window?
or does anyone konw how to do this?
Thanks
Josh