Skip to content

ByteReadOnlySpanExtensions.GetInt32 Method ​

Overloads ​

NameDescription
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.

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

View source

Parameters ​

NameTypeDescription
bytesReadOnlySpan<Byte>

Returns ​

Int32

The Int32 value.

GetInt32(ReadOnlySpan<Byte>, Endian) ​

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

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

View source

Parameters ​

NameTypeDescription
bytesReadOnlySpan<Byte>
endianEndianThe endianness to use.

Returns ​

Int32

The Int32 value.