[Solved] Unique number in random?


public static void FisherYatesShuffle<T>(T[] array)
{
    Random r = new Random();
    for (int i = array.Length - 1; i > 0; i--)
    {
        int j = r.Next(0, i + 1);
        T temp = array[j];
        array[j] = array[i];
        array[i] = temp;
    }
}

int[] array = new int[10000];

for (int i = 0; i < array.Length; i++) array[i] = i;
FisherYatesShuffle(array);

1

solved Unique number in random?