Skip to content

ByteReadOnlySpanExtensions.GetInt16 Method

Overloads

Name Description
GetInt16(ReadOnlySpan<Byte>) Reads a little-endian Int16 from a read-only span of bytes.
GetInt16(ReadOnlySpan<Byte>, Endian) Reads a Int16 from a read-only span of bytes using the specified endianness.

GetInt16(ReadOnlySpan<Byte>)

Reads a little-endian Int16 from a read-only span of bytes.

public static Int16 GetInt16(this ReadOnlySpan<Byte> bytes);

View source

Parameters

Name Type Description
bytes ReadOnlySpan<Byte>

Returns

Int16

The Int16 value.

GetInt16(ReadOnlySpan<Byte>, Endian)

Reads a Int16 from a read-only span of bytes using the specified endianness.

public static Int16 GetInt16(this ReadOnlySpan<Byte> bytes, Endian endian);

View source

Parameters

Name Type Description
bytes ReadOnlySpan<Byte>
endian Endian The endianness to use.

Returns

Int16

The Int16 value.