title: Keep Console.ReadLine always on last line
body: <p>I have an application written in C# which takes continuously commands from the user via a while(true) loop and Console.ReadLine.</p>
  
  <p>I also do have various background operations which report back via the console. View this simple example:</p>
  
  <pre><code>class Program
  {  
          static void Main(string[] args)
          {
              new Messager(1000 * 2.5f);
              new Messager(1000 * 3);
              while (true)
              {
                  Console.ReadLine();
              }
          }
  }
  
  public class Messager
  {
      Timer Timer;
  
      public Messager(double interval)
      {
          this.Timer = new Timer(interval);
          this.Timer.Elapsed += (sender, e) =&gt;
          {
              Console.WriteLine("message from " + this.Timer.Interval);
          };
          this.Timer.Start();
      }
  }
  </code></pre>
  
  <p>The problem is, when I enter a command and a Messager reports back before I have pressed Enter the message from the Messager will be appended to my current line and the cursor will be placed into the next line. See this screenshot:</p>
  
  <p><img src="https://i.imgur.com/Hu3Zic8.png" alt="The problem"></p>
  
  <p>As you'd guess I don't want that. I want the current inputting of a command to remain always in the last line and have all the messages coming placed above that line. Just as you'd expect from such an application. How do I achieve that?</p>