Skip to content

ByteSpanExtensions.GetInt16 Method ​

Overloads ​

NameDescription
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.

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

View source

Parameters ​

NameTypeDescription
bytesSpan<Byte>

Returns ​

Int16

The Int16 value.

GetInt16(Span<Byte>, Endian) ​

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

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

View source

Parameters ​

NameTypeDescription
bytesSpan<Byte>
endianEndianThe endianness to use.

Returns ​

Int16

The Int16 value.