Random.NextBytes(Byte[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Generates random bytes and places them into a user-supplied byte array.
[Android.Runtime.Register("nextBytes", "([B)V", "GetNextBytes_arrayBHandler")]
public virtual void NextBytes (byte[]? bytes);
[<Android.Runtime.Register("nextBytes", "([B)V", "GetNextBytes_arrayBHandler")>]
abstract member NextBytes : byte[] -> unit
override this.NextBytes : byte[] -> unit
Parameters
- bytes
- Byte[]
the byte array to fill with random bytes
Implements
- Attributes
Remarks
Generates random bytes and places them into a user-supplied byte array. The number of random bytes produced is equal to the length of the byte array.
Added in 1.1.
Java documentation for java.util.Random.nextBytes(byte[])
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.