Retrieves the byte at the specified location in the array.
[Visual Basic] Public Shared Function GetByte( _ ByVal array As Array, _ ByVal index As Integer _ ) As Byte [C#] public static byte GetByte( Array array, int index ); [C++] public: static unsigned char GetByte( Array* array, int index ); [JScript] public static function GetByte( array : Array, index : int ) : Byte;
Returns the index byte in the array.
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 GetByte method gets a particular byte out of the array. The array must be an array of primitives. This essentially does the following:
return ((byte*)array) + index