Converts two unsigned bytes beginning at the specified index in the specified array into a 16-bit signed integer value.
[Visual Basic] Public Shared Function ToInt16( _ ByVal value() As Byte, _ ByVal startIndex As Integer _ ) As Short [C#] public static short ToInt16( byte[] value, int startIndex ); [C++] public: static short ToInt16( unsigned char* value[], int startIndex ); [JScript] public static function ToInt16( value : Byte[], startIndex : int ) : Int16;
Returns a 16-bit signed integer formed from two unsigned bytes beginning at startIndex.
Exception Type | Condition |
---|---|
ArgumentException | value is null. |
ArgumentException | startIndex is a value that results in invalid access to the array. |
BitConverter Class | BitConverter Members | System Namespace