Hi all,
I'm writing code to generate a small number of random integers between 1 and 10 using C#'s Random.Next function, and I do not want each number called more than once.
I can't find anything in the literature about how to prevent the random function from repeating a number.
Should I work around it by doing something like putting each number in an array and checking to see if the number has already been stored in the array??
Thanks in advance,
-b
I'm writing code to generate a small number of random integers between 1 and 10 using C#'s Random.Next function, and I do not want each number called more than once.
I can't find anything in the literature about how to prevent the random function from repeating a number.
Should I work around it by doing something like putting each number in an array and checking to see if the number has already been stored in the array??
Thanks in advance,
-b