I want to display a stopwatch but i don't want to clean my console for each dislay ,
Stopwatch chrono = new Stopwatch();
chrono.Start();
bool isMyComputerOn = true;
while (isMyComputerOn)
{
Console.WriteLine("Time : "+chrono.Elapsed);
}
Any idea ?
You must use SetCursorPosition to fix the position of you cursor
Stopwatch chrono = new Stopwatch();
chrono.Start();
bool isMyComputerOn = true;
while (isMyComputerOn)
{
Console.SetCursorPosition(1,1);
Console.WriteLine("Time : "+chrono.Elapsed);
}