Class MultiThreadRandom
A thread safe random number generator.
public class MultiThreadRandom : Random
- Inheritance
-
MultiThreadRandom
- Inherited Members
- Extension Methods
Constructors
MultiThreadRandom()
Instantiates new thread safe random number generator.
public MultiThreadRandom()
MultiThreadRandom(int)
Instantiates a new tread safe random number generator using the specified seed.
public MultiThreadRandom(int seed)
Parameters
seed
int
Methods
Next()
Returns the next random integer.
public override int Next()
Returns
Next(int)
Returns a nonnegative random number less than the specified maximum.
public override int Next(int maxValue)
Parameters
maxValue
int
Returns
Next(int, int)
Returns a random number within the specified range.
public override int Next(int minValue, int maxValue)
Parameters
Returns
NextBytes(byte[])
Fills the elements of a specified array of bytes with random numbers.
public override void NextBytes(byte[] buffer)
Parameters
buffer
byte[]
NextDouble()
Returns a random number between 0.0 and 1.0.
public override double NextDouble()
Returns
NextDouble(double, double)
Returns a random number withint the specified range.
public double NextDouble(double minValue, double maxValue)