C# Language Generate a random int in a given range


Example

Generate a random number between minValue and maxValue - 1.

Random rnd = new Random();
var randomBetween10And20 = rnd.Next(10, 20);