Skip to content

ByteSpanExtensions.GetInt16 Method

Overloads

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

GetInt16(Span<Byte>)

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

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

View source

Parameters

Name Type Description
bytes Span<Byte>

Returns

Int16

The Int16 value.

GetInt16(Span<Byte>, Endian)

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

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

View source

Parameters

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

Returns

Int16

The Int16 value.