This question has already been answered:
- Initial value of Random () in C # 1 response
Something confuses me with random ...
public class Rand { List<int> tmp = new List<int>(); int max; int[] array; public Rand(int max) { this.max = max; array = new int[max]; for (int i = 0; i < this.max; i++) { tmp.Add(i); } } public int[] Next() { int t; for (int i = max-1; i >= 0; i--) { t = new Random().Next(i); array[i] = tmp[t]; tmp.RemoveAt(t); } return array; } } Why the random always looks like this

Not too random
And if about the task as a whole, you need to make an array of random numbers, but so that the numbers do not repeat