Generate a random number between minValue and maxValue - 1.
minValue
maxValue - 1
Random rnd = new Random(); var randomBetween10And20 = rnd.Next(10, 20);