I've seen this question posted a few times but the questions I've visited don't have a solid answer for me. I've wrote a dummy application below just to try this out and I've noticed it has some issues.
It'll replace the new line with the next line in the list, the problem is if the previous line was longer than the new line you'll still be able to see the end of the previous line.
If you run the code below you'll see this at the end when it should be writing something along the lines of How would did your new hat cost?
but writes something more like How would did your new hat cost?it?
which includes the end of the previous line.
static void Main(string[] args)
{
Console.CursorVisible = false;
Console.WriteLine();
var myLines = new List<string>
{
"I like dogs, but not cats.",
"Want to get an icecream tomorrow?",
"I would like to go to the park.",
"If I was arrested, would you visit?",
"How much did your new hat cost?"
};
foreach (var line in myLines)
{
Console.WriteLine($" [{DateTime.Now.ToShortTimeString()}] Processing: " + line);
Console.SetCursorPosition(0, Console.CursorTop - 1);
Thread.Sleep(new Random().Next(200, 900));
}
Console.ReadKey(true);
}