Table of Contents

Class SystemRandom

Namespace
Xui.Core.Abstract
Assembly
Xui.Core.dll

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

SystemRandom

Methods

Next(int, int)

Returns a random integer within the specified range.

public int Next(int minValue, int maxValue)

Parameters

minValue int

Inclusive lower bound of the random number.

maxValue int

Exclusive 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.