C# Class CryptoRandom, WingTipTickets

Inheritance: RandomNumberGenerator
Afficher le fichier Open project: Microsoft/WingTipTickets Class Usage Examples

Méthodes publiques

Méthode Description
CryptoRandom ( ) : System

Creates an instance of the default implementation of a cryptographic random number generator that can be used to generate random data.

GetBytes ( byte buffer ) : void

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

Next ( ) : int

Returns a nonnegative random number.

Next ( int maxValue ) : int

Returns a nonnegative random number less than the specified maximum

Next ( int minValue, int maxValue ) : int

Returns a random number within the specified range.

NextDouble ( ) : double

Returns a random number between 0.0 and 1.0.

Method Details

CryptoRandom() public méthode

Creates an instance of the default implementation of a cryptographic random number generator that can be used to generate random data.
public CryptoRandom ( ) : System
Résultat System

GetBytes() public méthode

Fills the elements of a specified array of bytes with random numbers.
public GetBytes ( byte buffer ) : void
buffer byte An array of bytes to contain random numbers.
Résultat void

Next() public méthode

Returns a nonnegative random number.
public Next ( ) : int
Résultat int

Next() public méthode

Returns a nonnegative random number less than the specified maximum
public Next ( int maxValue ) : int
maxValue int The inclusive upper bound of the random number returned. maxValue must be greater than or equal 0
Résultat int

Next() public méthode

Returns a random number within the specified range.
public 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 returned. maxValue must be greater than or equal to minValue.
Résultat int

NextDouble() public méthode

Returns a random number between 0.0 and 1.0.
public NextDouble ( ) : double
Résultat double