Skip to content

ByteSpanExtensions.SetUInt16 Method ​

Overloads ​

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

SetUInt16(Span<Byte>, UInt16) ​

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

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

View source

Parameters ​

NameTypeDescription
bytesSpan<Byte>
valueUInt16The UInt16 value to write.

SetUInt16(Span<Byte>, UInt16, Endian) ​

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

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

View source

Parameters ​

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