MathUtilities.BytesToShort(Byte[], Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts an array of two bytes to a short integer.
public static short BytesToShort(byte[] bytes, int offset = 0);
static member BytesToShort : byte[] * int -> int16
Public Shared Function BytesToShort (bytes As Byte(), Optional offset As Integer = 0) As Short
Parameters
- bytes
- Byte[]
Array of bytes (must be at least two bytes in length).
- offset
- Int32
Offset within the array at which to begin reading.
Returns
Short integer value created the provided bytes.