Class SystemRandom
Default random implementation backed by Shared.
public sealed class SystemRandom : IRandom
- Inheritance
-
SystemRandom
- Implements
- Inherited Members
Properties
Default
Gets the shared default system random instance.
public static SystemRandom Default { get; }
Property Value
Methods
Next(int, int)
Returns a random integer within the specified range.
public int Next(int minValue, int maxValue)
Parameters
minValueintInclusive lower bound of the random number.
maxValueintExclusive upper bound of the random number.
Returns
- int
A random integer in the specified range.
NextDouble()
Returns a random floating-point number in the range [0.0, 1.0).
public double NextDouble()
Returns
- double
A random floating-point number.