RandomGenerator Type

Base class for all random generators

Constructors

Constructor Description

RandomGenerator()

Full Usage: RandomGenerator()

Constructs the random generator with a seed value of 0.

RandomGenerator(new_seed)

Full Usage: RandomGenerator(new_seed)

Parameters:
    new_seed : uint32 - The initial seed value.

Constructs the random generator with a seed value.

new_seed : uint32

The initial seed value.

RandomGenerator(hashstring)

Full Usage: RandomGenerator(hashstring)

Parameters:
    hashstring : string - The hash value of this string is used for the initial seed value.

Constructs the random generator with a seed using the hash value of a given string.

hashstring : string

The hash value of this string is used for the initial seed value.

Instance members

Instance member Description

this.Long

Full Usage: this.Long

Returns: uint32 The next random value.
Modifiers: abstract

The generation function.

Returns: uint32

The next random value.

this.Maximum

Full Usage: this.Maximum

Returns: uint32

The maximum value of the random number which can be returned.

Returns: uint32

this.Seed

Full Usage: this.Seed

Returns: uint32

The seed value.

Returns: uint32

Static members

Static member Description

RandomGenerator.DefaultGenerator

Full Usage: RandomGenerator.DefaultGenerator

Returns: RandomGenerator

The default random generator used to produce random values.

Returns: RandomGenerator

RandomGenerator.UniqueSeed()

Full Usage: RandomGenerator.UniqueSeed()

Returns: uint32 A seed value in the range [0, 2^31-1].

Generate an unique seed using the default seed generator, which is currently RNGCryptoServiceProvider

Returns: uint32

A seed value in the range [0, 2^31-1].