9.10.2 NextFloat

float NextFloat()

Return the next pseudo-random floating point value in the range [0.0, 1.0). To convert this value into an integer range, for example 10 discrete values, use int i = (int)floor(10.0*r.NextFloat()), which should return values in the range 0 to 9 inclusive.