Fills the given array of integers with random values.
Namespace:
CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 5.1.0.0
Syntax
| C# |
|---|
public void Fill( int[] v, int minValue, int maxValue, bool duplicates ) |
| Visual Basic (Declaration) |
|---|
Public Sub Fill ( _ v As Integer(), _ minValue As Integer, _ maxValue As Integer, _ duplicates As Boolean _ ) |
| Visual C++ |
|---|
public: void Fill( array<int>^ v, int minValue, int maxValue, bool duplicates ) |
Parameters
- v
- Type: array<
System..::.Int32
>[]()[]
An array.
- minValue
- Type: System..::.Int32
The lower bound.
- maxValue
- Type: System..::.Int32
The upper bound.
- duplicates
- Type: System..::.Boolean
Allow duplicates.
Remarks
v must be initialized before calling this method.
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::.InvalidArgumentException | Thrown if duplicates is false and the length of v is greater than the range of numbers desired. |