Randomizing numbers does not work
<blockquote>
  <p><strong>Possible Duplicates:</strong><br>
  <a href="http://stackoverflow.com/questions/932520/why-does-it-appear-that-my-random-number-generator-isnt-random-in-c">Why does it appear that my random number generator isn&#39;t random in C#?</a><br>
  <a href="http://stackoverflow.com/questions/767999/random-number-generator-not-working-the-way-i-had-planned-c">Random number generator not working the way I had planned (C#)</a>  </p>
</blockquote>



<p>Hello,<br>
I use this function (in class) to randomize numbers:</p>

<pre><code>private int RandomNumber(int min, int max)
{
    Random random = new Random();
    return random.Next(min, max);
}

public void Init()
{
    x = RandomNumber(0,500);
}
</code></pre>

<p>However if I later call multiple object to do it:</p>

<pre><code>Obj[] obj = new Obj[64];
for( int i = 0 ; i &lt; 64 ; i++ )
{
    obj[i] = new Obj();
}
...
for( int i = 0 ; i &lt; 64 ; i++ )
{
    obj[i].Init();
}
</code></pre>

<p>then each object has exactly same 'x' value.</p>

<p>What is wrong here?</p>
