title: c# Random class error
body: <p>I have the following script:</p>
  
  <pre><code>int n = Int32.Parse(Console.ReadLine());
  var r = new Random();
  Console.WriteLine(r.Next(1, n));
  </code></pre>
  
  <p>And I got this error message:</p>
  
  <blockquote>
    <p>'Random.Random' does not contain a definition for 'Next' and no extension method 'Next' accepting a first argument of type 'Random.Random' could be found (are you missing a using directive or an assembly reference?)</p>
  </blockquote>
  
  <p>Where did I go wrong?
  Thanks for your answers!</p>