I’m trying to make List with random numbers inside but that will not repeat them self.
So if there is a number 310 so it will not be more then once in the List.
I don’t see duplicated numbers but i see numbers that are not in the range.
The range is between 300 and 800 but i see in the List numbers like 906,960,834,1054
What i want to do is a List with none repeat numbers and in range between 300 and 800.
private void rndNumbers()
{
int Min = 300;
int Max = 800;
System.Random rnd = new System.Random();
randomNumbers = Enumerable.Range(Min, Max).OrderBy(x => rnd.Next()).Take(ObjectsToMove.Length).ToList();
}