Generate a random number between 0 and 1.0. (not including 1.0)
Random rnd = new Random(); var randomDouble = rnd.NextDouble();