Skip to content

ByteSpanExtensions.SetInt32 Method ​

Overloads ​

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

SetInt32(Span<Byte>, Int32) ​

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

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

View source

Parameters ​

NameTypeDescription
bytesSpan<Byte>
valueInt32The value to write.

SetInt32(Span<Byte>, Int32, Endian) ​

Writes an Int32 to a span of bytes using the specified endianness.

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

View source

Parameters ​

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