- 1
how can i random numbers without repetition untill all the numbers are loaded?
i am using array and not list.
2 Antworten
+ 1
you'll need an if statement to check whether the array already contains the generated random number. Be careful when generating random numbers not to keep creating new random object. the initial one can be reused.
- 1
you can use the class Random : Random r =new Random(min,max) ; int val = r.Next()//pick a new number