IProvideRandomValues
01 Syntax
Microsoft.VisualBasic.Math.IProvideRandomValues
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| NextFloat | 1 | Generates a random float. |
| NextFloats | 1 | Fills the elements of a specified array of bytes with random numbers. |
| Next | 1 | Returns a random integer that is within a specified range. |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| IsThreadSafe | 1 |
04 Members
NextFloat
Generates a random float. Values returned are from 0.0 up to but not including 1.0.
NextFloats(
Double())Fills the elements of a specified array of bytes with random numbers.
Parameters
| Name | Type | Description |
|---|---|---|
buffer | Double() | An array of bytes to contain random numbers. |
Next(
Int32, Int32)Returns a random integer that is within a specified range.
Parameters
| Name | Type | Description |
|---|---|---|
minValue | Int32 | The inclusive lower bound of the random number returned. |
maxValue | Int32 | 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.
IsThreadSafe