Skip to content

ByteSpanExtensions.SetInt16 Method ​

Overloads ​

NameDescription
SetInt16(Span<Byte>, Int16)Writes a little-endian Int16 to a span of bytes.
SetInt16(Span<Byte>, Int16, Endian)Writes a Int16 to a span of bytes using the specified endianness.

SetInt16(Span<Byte>, Int16) ​

Writes a little-endian Int16 to a span of bytes.

c#
public static void SetInt16(this Span<Byte> bytes, Int16 value);

View source

Parameters ​

NameTypeDescription
bytesSpan<Byte>
valueInt16The value to write.

SetInt16(Span<Byte>, Int16, Endian) ​

Writes a Int16 to a span of bytes using the specified endianness.

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

View source

Parameters ​

NameTypeDescription
bytesSpan<Byte>
valueInt16The value to write.
endianEndianThe endianness to use.