title: Why do two tasks created after each other generate the same random value?
body: <pre><code>Task.Factory.StartNew(() =&gt;
      {
      new Class1();
      })
  
  Task.Factory.StartNew(() =&gt;
      {
      new Class2();
      })
  </code></pre>
  
  <p>In the constructor of class1 and class2 I have:</p>
  
  <pre><code>var timeout = new Random().Next(0, 5000);
  Debug.Print(timeout.ToString());
  </code></pre>
  
  <p>The random value 'timeout' is always the same in both classes. I don't understand why..</p>
  
  <p>If I add a pause between the creation of the tasks then it's not the same.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I don't understand how this is related to "<a href="https://stackoverflow.com/questions/1122483/random-string-generator-returning-same-string">Random String Generator Returning Same String</a>".</p>
  
  <p>They were creating the random instance in the method. I am calling it in completely different Tasks, so they should be independent of each other.</p>