Retrieves the byte at the specified location in the array.
[Visual Basic] Public Shared Sub SetByte( _ ByVal array As Array, _ ByVal index As Integer, _ ByVal value As Byte _ ) [C#] public static void SetByte( Array array, int index, byte value ); [C++] public: static void SetByte( Array* array, int index, unsigned char value ); [JScript] public static function SetByte( array : Array, index : int, value : Byte );
An array with the value added at the specified location.
Exception Type | Condition |
---|---|
ArgumentException | If the array is not a primitive. |
ArgumentNullException | If the array is null. |
ArgumentOutOfRangeException | If the index is negative or greater than the array length. |
The SetByte method sets a particular byte in an array. The array must be an array of primitives. This essentially does the following:
*(((byte*)array) + index) = value