how to get a random int in c# code example
Example 1: c# random int
Random rnd = new Random();
int number = rnd.Next(1, 10);
Example 2: c# generate random number
// Creates a random number between 1 and 10
int randomNumber = new Random().Next(1, 11);