PERSONA PERSONA - 5 months ago 41
C# Question

Prevent the console from overwrting a line

Is there a way for me to stop the console from printing to the top line?
So :

this line in the console doesn't change

but this one and the ones under it can

Any help would be greatly appreciated. Thanks.


I think if you want leave the first line alone without overwrite it, you can use Console.SetCursorPosition.


// Set cursor starting from the second line
Console.SetCursorPosition(0, 1);
Console.WriteLine("The second line");