Get Random Number Between Two Numbers

This can be useful for generating test data.
Or perhaps for generating a random delay in seconds.

<pre>
        public static double GetRandomNumber(double minimum, double maximum)
        {
            Random random = new Random();
            return random.NextDouble() * (maximum - minimum) + minimum;
        }
</pre>

Uncategorized  

Leave a Reply