title: How do I prevent crashing from invalid user input?
body: <p>I have encountered a problem where my program crashes due to the input of the user not  following the variable data type. What I am asking the user to do is register some data for a movie. When we reach the year of release for the movie, it crashes, should the user input not follow the integer data type.</p>
  
  <p>What I then also was trying to do is to make sure the value of int release is a number between 1000 and 2050.</p>
  
  <p>What I want to have happen:
  The user is forced to enter a value between 1000 and 2050. Should a different value be entered, he is asked to try again.</p>
  
  <p>The code I believe should be relevant:</p>
  
  <pre><code>public static void RegisterMovie()
      {
          Console.Write("Ange titel: ");
          string title = Console.ReadLine();
          Console.Write("Ange genre: ");
          string genre = Console.ReadLine();
  
          Console.Write("Ange release: ");
          int release = int.Parse(Console.ReadLine());
  
          Console.Write("Ange actor: ");
          string actor = Console.ReadLine();
          Console.Write("Ange director: ");
          string director = Console.ReadLine();
  
          Movie m = CreateMovie(title, genre, release, actor, director);
          AddMovie(m);
      }
  </code></pre>
  
  <p>Thanks for helping me out.</p>