Skip to content

ByteReadOnlySpanExtensions.GetInt32 Method

Overloads

Name Description
GetInt32(ReadOnlySpan<Byte>) Reads a little-endian Int32 from a read-only span of bytes.
GetInt32(ReadOnlySpan<Byte>, Endian) Reads an Int32 from a read-only span of bytes using the specified endianness.

GetInt32(ReadOnlySpan<Byte>)

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

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

View source

Parameters

Name Type Description
bytes ReadOnlySpan<Byte>

Returns

Int32

The Int32 value.

GetInt32(ReadOnlySpan<Byte>, Endian)

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

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

View source

Parameters

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

Returns

Int32

The Int32 value.