title: generate random numbers with no repeat in c#
body: <p>How can I generate random numbers with no repeat in C#. I have one array and I want to fill every room with random numbers from 0 to 9. Each room shoud have diffrent numbers. I use this:</p>
  
  <pre><code>for (int i = 0; i &lt; 20; i++)
  {
      Random rnd = new Random();
      int temp = 0;
      temp = rnd.Next(0, 9);
      page[i] = temp;
  }
  </code></pre>
  
  <p>But I get same number in evey room's of array.</p>