title: What does Int32.Parse do exactly?
body: <p>I am just beginning to learn C#. I am reading a book and one of the examples is this:</p>
  
  <pre><code>using System;
  
  public class Example
  {
      public static void Main()
      {
          string myInput;
          int myInt;
  
          Console.Write("Please enter a number: ");
          myInput = Console.ReadLine();
          myInt = Int32.Parse(myInput);
  
          Console.WriteLine(myInt);
          Console.ReadLine();
      }
  }
  </code></pre>
  
  <p>When i run that and enter say 'five' and hit return, i get 'input string not in correct format' error. The thing i don't understand is, i converted the string myInput to a number didn't i? Microsoft says that In32.Parse 'Converts the string representation of a number to its 32-bit signed integer equivalent.' So how come it doesn't work when i type the word five? It should be converted to an integer shouldn't it... confused. Thanks for advice. </p>