how to get a random integer in c# code example
Example 1: c# random int
Random rnd = new Random();
int number = rnd.Next(1, 10);
Example 2: generate a random number in c#
Random rnd = new Random();
int value = rnd.Next(min,max);
Console.Write(value);