title: Cannot implicitly convert "string" to "int" when reading integers from a file
body: <p>I am new to C# and needing some help. If someone could explain why this is happening and not just give me an answer, that would be much appreciated.</p>
  
  <p>I get the following error message:</p>
  
  <blockquote>
    <p><em>Cannot implicitly convert string to int</em></p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>int[] arrayData = new int[12];
  
  StreamReader scores = new StreamReader("scores.txt")
  
  while (scores.Peek() != null)
  {
      arrayData[counter] = scores.ReadLine();  // &lt;-- above error occurs here
      counter = counter + 1;
  }
  
  scores.Close();
  </code></pre>
  
  <p>I also have one other question if someone can help.</p>
  
  <pre><code>string x = …
  int y = …
  if (x &gt; y) …  // &lt;-- below errors occurs here 
  </code></pre>
  
  <p>Error messages: </p>
  
  <blockquote>
    <p><em>Operator > cannot be applied to string and int</em></p>
  </blockquote>