Buffer: SetByte

SetByte

Sets the byte value at a given byte index within the array.



 Public Sub SetByte(
	  ByRef Arr As Variant,
	  ByVal Index As Long,
	  ByVal Value As Byte )

Parameters

Arr
[ByRef] Variant. The array to set the byte value in.
Index
[ByVal] Long. The byte index into the array to set the byte at.
Value
[ByVal] Byte. The byte value to set.

Remarks

The index is based on bytes, not the size of the actual array elements. For example: if setting the byte of a Long array at index 3 , then the upper 8-bits of the first element will be set.

The lower-bound of the array is ignored. Index begins at 0.

Exceptions

ExceptionCondition
ArgumentNullExceptionArr is unintialized.
ArgumentExceptionArr is not an array.
ArgumentOutOfRangeExceptionIndex is negative or greater than the length of Arr.

See Also

Project CorLib Overview

Class Buffer Overview