0
How can we generate random numbers in specific range using c#?
3 Antworten
+ 1
Random rand = new Random();
int randNum = rand.next(0, 101); // random number from and including 0 to but not including 101 (0-100)
+ 2
Example:
Random rand = new Random();
int rand_number = rand.Next(1, 51) // random numbers from 1 to 50
0
yes totally both are correct..