Assign values to Int Array (without repeating!)
<p>I need to assign values to an IntArray with 1000 elements randomly. But the elements cannot be repeated. I used this code...</p>

<pre><code>public int[] Numbers()
{
    Random random = new Random();
    int check;

    for (int i = 0; i &lt; numbers.Length; i++)
    {
        check = random.Next(0, 9999);

        while (!numbers.Contains(check))
        {
            numbers[i] = check;
        }
    }

    return numbers;
}
</code></pre>

<p>But then, an amount of numbers get the default values (0). What am I doing wrong ?</p>
