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;
A 16-bit unsigned integer formed by the two bytes beginning at startIndex.
Exception Type | Condition |
---|---|
ArgumentNullException | if value is null. |
ArgumentOutOfRangeException | if startIndex is less than zero or greater than the length of value-2. |
BitConverter Class | BitConverter Members | System Namespace