For future readers if you want a random number in a range use the following code:
public double GetRandomNumberInRange(Random random,double minNumber, double maxNumber) { return random.NextDouble() * (maxNumber - minNumber) + minNumber; } usage:
Random r = new Random(); double num1 = GetRandomNumberInRange(r, 50, 100)