title: C# - The name does not exist in the current context
body: <p>I started my C# study this week and got trouble with this assignment.<br>
  The expensive book they made us buy does a poor job explaining this.<br>
  We have to use, If, Else, While and Do in this assignment.</p>
  
  <p>I get this error, The name 'answer' does not exist in the current context.<br>
  What am I doing wrong?</p>
  
  <pre><code>int question = 25;
  
  do
  {
      Console.Write("Guess the number: ");
      string strAnswer = Console.ReadLine();
      int answer = Convert.ToInt32(strAnswer);
  
      if (answer &lt; question)
      {
          Console.WriteLine("Too low, guess again. ");
      }
      else if (answer &gt; question)
      {
          Console.WriteLine("Too high, guess again. ");
      }
  }
  
  while (answer != question);
  Console.Write("Correct!");
  </code></pre>