title: Exiting 'do while ReadLine' loop not working
body: <p>I am trying to learn C# as I have little experience there. I wanted to set up a Console.Readline in a <code>Do While</code> loop so I can read in an unknown amount of values into an array. It never exits so the comparison in the <code>while</code> is not working. What is wrong?</p>
  
  <pre><code>do
  {
      line = Console.Read();
      if (line != null)
          numbers[c++] = line;
      numbers = new int[c+1];
  
  } while (line != null);
  </code></pre>