C# Класс nv.PriorityQueue.StaticRandom

Thread-safe equivalent of System.Random, using just static methods. If all you want is a source of random numbers, this is an easy class to use. If you need to specify your own seeds (eg for reproducible sequences of numbers), use System.Random.
Показать файл Открыть проект

Открытые методы

Метод Описание
Next ( ) : int

Returns a nonnegative random number.

Next ( int max ) : int

Returns a nonnegative random number less than the specified maximum.

Next ( int min, int max ) : int

Returns a random number within a specified range.

NextBytes ( byte buffer ) : void

Fills the elements of a specified array of bytes with random numbers.

NextDouble ( ) : double

Returns a random number between 0.0 and 1.0.

Описание методов

Next() публичный статический Метод

Returns a nonnegative random number.
public static Next ( ) : int
Результат int

Next() публичный статический Метод

Returns a nonnegative random number less than the specified maximum.
maxValue is less than zero.
public static Next ( int max ) : int
max int
Результат int

Next() публичный статический Метод

Returns a random number within a specified range.
minValue is greater than maxValue.
public static Next ( int min, int max ) : int
min int The inclusive lower bound of the random number returned.
max int /// The exclusive upper bound of the random number returned. /// maxValue must be greater than or equal to minValue. ///
Результат int

NextBytes() публичный статический Метод

Fills the elements of a specified array of bytes with random numbers.
buffer is a null reference (Nothing in Visual Basic).
public static NextBytes ( byte buffer ) : void
buffer byte An array of bytes to contain random numbers.
Результат void

NextDouble() публичный статический Метод

Returns a random number between 0.0 and 1.0.
public static NextDouble ( ) : double
Результат double