title: How can I print values from a text file in the console?
body: <p>I've been trying to read some values from a <code>Values.txt</code> file and then print them in the console using C#. Everything appears to work. I've debugged the code and found nothing wrong and the program is compiling. The problem is that the values wont appear on the console. It just prints empty lines. </p>
  
  <p>Here's my code :</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.IO;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  namespace TestFileReadTest
  {
      class Program
      {
          static void Main(string[] args)
          {
              StreamReader myReader = new StreamReader("Values.txt");
              string line = "";
  
              while (line != null)
              {
                  line = myReader.ReadLine();
                  if (line!= null)
                      Console.WriteLine();
              }
              myReader.Close();
              Console.WriteLine("Allo");
              Console.ReadLine();
          }
      }
  }
  </code></pre>
  
  <p>I'm using Visual Studio Express 2013</p>