EndianOrderToUInt16 Method

Returns a 16-bit unsigned integer converted from two bytes, accounting for target endian-order, at a specified position in a byte array.

Definition

Namespace: Gemstone
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public ushort ToUInt16(
	byte[] value,
	int startIndex
)

Parameters

value  Byte
An array of bytes (i.e., buffer containing binary image of value).
startIndex  Int32
The starting position within value.

Return Value

UInt16
A 16-bit unsigned integer formed by two bytes beginning at startIndex.

Exceptions

ArgumentNullExceptionvalue is null.
ArgumentOutOfRangeExceptionstartIndex is less than zero or greater than the length of value minus 1.

See Also