Buffer.GetByte Method (Array, Int32)

 

Retrieves the byte at a specified location in a specified array.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

static member GetByte : 
        array:Array *
        index:int -> byte

Parameters

array
Type: System.Array

An array.

index
Type: System.Int32

A location in the array.

Return Value

Type: System.Byte

Returns the index byte in the array.

Exception Condition
ArgumentException

array is not a primitive.

ArgumentNullException

array is null.

ArgumentOutOfRangeException

index is negative or greater than the length of array.

OverflowException

array is larger than 2 gigabytes (GB).

The GetByte method gets a particular byte out of the array. The array must be an array of primitives.

The following code example displays the byte values at specified locations within arrays using the GetByte method.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: