Skip to content

ByteSpanExtensions.GetInt32 Method ​

Overloads ​

NameDescription
GetInt32(Span<Byte>)Reads a little-endian Int32 from a span of bytes.
GetInt32(Span<Byte>, Endian)Reads an Int32 from a span of bytes using the specified endianness.

GetInt32(Span<Byte>) ​

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

c#
public static int GetInt32(this Span<Byte> bytes);

View source

Parameters ​

NameTypeDescription
bytesSpan<Byte>

Returns ​

Int32

The Int32 value.

GetInt32(Span<Byte>, Endian) ​

Reads an Int32 from a span of bytes using the specified endianness.

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

View source

Parameters ​

NameTypeDescription
bytesSpan<Byte>
endianEndianThe endianness to use.

Returns ​

Int32

The Int32 value.