title: How to loop a Console.ReadLine?
body: <p>I cannot figure out how to read user-input in a loop (with <code>Console.ReadLine</code>). I'm trying to create a note that lets me store what ever the user inputs, and exits if he types exit.</p>
  
  <pre><code> using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  namespace ConsoleApplication4
  {
      class Program
      {
          static void Main(string[] args)
          {
  
              Note myNote = new Note();
              Note otherNote = new Note();
              myNote.addText("Hi there");
              Console.WriteLine(myNote.display());
              otherNote.addText(Console.ReadLine());
              Console.WriteLine(otherNote.display());
              if (otherNote = "exit")
              {
  
              }
  
          }
      }
  
  
  }
  
  
      class Note
  {
      private string text = "";
      private DateTime timeStamp = DateTime.Now;
      private DateTime modifiedStamp = DateTime.Now;
      int maxLength = 10;
  
  
      public void addText(string sometext)
      {
          if (text.Length + sometext.Length &lt; maxLength)
          {
              text += sometext;
              modifiedStamp = DateTime.Now;
          }
  
      }
  
      public string display()
      {
          return "Created: " + timeStamp.ToString() + "\n" +
              "Modified: " + modifiedStamp.ToString() + "\n" +
              "Content: " + text;
      }
  }
  </code></pre>