NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Buffer.SetByte

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
);

Parameters

array
The array that contains the new value.
index
The location in the array to put the value.
value
The new value to assign.

Return Value

An array with the value added at the specified location.

Exceptions

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.

Remarks

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

See Also

Buffer Class | Buffer Members | System Namespace