C# Class Rolcore.ThreadSafeRandom

Provides a thread-safe, statistically random operations. Use instead of Random.
Afficher le fichier Open project: Rollins/Rolcore

Méthodes publiques

Méthode Description
Next ( ) : int

Returns a non-negative random number.

Next ( int maxValue ) : int

Returns a non-negative random number less than the specified maximum.

Next ( int minValue, int maxValue ) : int

Returns a random number within a specified range.

Private Methods

Méthode Description
EnsureLocal ( ) : void

Ensures a thread-local Random instance is available.

Method Details

Next() public static méthode

Returns a non-negative random number.
public static Next ( ) : int
Résultat int

Next() public static méthode

Returns a non-negative random number less than the specified maximum.
public static Next ( int maxValue ) : int
maxValue int The exclusive upper bound of the random number to be generated. /// Must be greater than or equal to zero.
Résultat int

Next() public static méthode

Returns a random number within a specified range.
public static Next ( int minValue, int maxValue ) : int
minValue int The inclusive lower bound of the random number returned.
maxValue int The exclusive upper bound of the random number to be generated. /// Must be greater than or equal to zero.
Résultat int