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!

BitConverter.ToUInt16

Converts an array of bytes into a 16-bit unsigned integer.

[Visual Basic]
Public Shared Function ToUInt16( _
   ByVal value() As Byte, _
   ByVal startIndex As Integer _
) As UInt16
[C#]
public static ushort ToUInt16(
   byte[] value,
   int startIndex
);
[C++]
public: static unsigned short ToUInt16(
   unsigned char* value[],
   int startIndex
);
[JScript]
public static function ToUInt16(
   value : Byte[],
   startIndex : int
) : UInt16;

Parameters

value
The array of bytes.
startIndex
The position within value at which to begin.

Return Value

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

Exceptions

Exception Type Condition
ArgumentNullException if value is null.
ArgumentOutOfRangeException if startIndex is less than zero or greater than the length of value-2.

See Also

BitConverter Class | BitConverter Members | System Namespace