The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
RandomNumberGenerator::GetBytes Method (array<Byte>^, Int32, Int32)
.NET Framework (current version)
Fills the specified byte array with a cryptographically strong random sequence of values.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- data
-
Type:
array<System::Byte>^
The array to fill with cryptographically strong random bytes.
- offset
-
Type:
System::Int32
The index of the array to start the fill operation.
- count
-
Type:
System::Int32
The number of bytes to fill.
| Exception | Condition |
|---|---|
| ArgumentNullException | data is null. |
| ArgumentOutOfRangeException | offset or count is less than 0 |
| ArgumentException | offset plus count exceeds the length of data. |
.NET Framework
Available since 4.6
Available since 4.6
Show: