June 2005 - Posts

Showing progress in console application

Sometimes It helps us to see progress of our console application. But if It will print each line it will be a little confusing. So here is code that will print status in one line:

for(Int i=0;i<1024;i++)
{
   Console.Write(“Showing {0}\r“, i);
}

Enjoy :)