nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Math.Randomizer / ThreadSafeFastRandom

ThreadSafeFastRandom

Full name Microsoft.VisualBasic.Math.ThreadSafeFastRandom Assembly Microsoft.VisualBasic.Math.Randomizer Members 5

01 Syntax

Microsoft.VisualBasic.Math.ThreadSafeFastRandom

02 Methods

NameOverloadsSummary
Next 3 Returns a non-negative random integer.
NextFloat 1 Generates a random float.
NextFloats 1 Fills the elements of a specified array of bytes with random numbers.

03 Members

method Next #
Next

Returns a non-negative random integer.

Returns

A 32-bit signed integer that is greater than or equal to 0 and less than System.Int32.MaxValue.

method Next overload 3 #
Next(Int32)

Returns a non-negative random integer that is less than the specified maximum.

Parameters
NameTypeDescription
maxValueInt32

The exclusive upper bound of the random number to be generated. maxValue must be greater than or equal to 0.

Returns

A 32-bit signed integer that is greater than or equal to 0, and less than maxValue; that is, the range of return values ordinarily includes 0 but not maxValue. However, if maxValue equals 0, maxValue is returned.

method Next overload 2 #
Next(Int32, Int32)

Returns a random integer that is within a specified range.

Parameters
NameTypeDescription
minValueInt32

The inclusive lower bound of the random number returned.

maxValueInt32

The exclusive upper bound of the random number returned. maxValue must be greater than or equal to minValue.

Returns

A 32-bit signed integer greater than or equal to minValue and less than maxValue; that is, the range of return values includes minValue but not maxValue. If minValue equals maxValue, minValue is returned.

method NextFloat #
NextFloat

Generates a random float. Values returned are from 0.0 up to but not including 1.0.

method NextFloats #
NextFloats(Double())

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

Parameters
NameTypeDescription
bufferDouble()

An array of bytes to contain random numbers.