Skip to content

ByteSpanExtensions.GetInt32 Method

Overloads

Name Description
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.

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

View source

Parameters

Name Type Description
bytes Span<Byte>

Returns

Int32

The Int32 value.

GetInt32(Span<Byte>, Endian)

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

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

View source

Parameters

Name Type Description
bytes Span<Byte>
endian Endian The endianness to use.

Returns

Int32

The Int32 value.