Skip to content

ByteArrayExtensions.GetInt32 Method ​

Overloads ​

NameDescription
GetInt32(Byte[], Int32)Reads a little-endian Int32 from a byte array at the specified index.
GetInt32(Byte[], Int32, Endian)Reads an Int32 from a byte array at the specified index using the specified endianness.

GetInt32(Byte[], Int32) ​

Reads a little-endian Int32 from a byte array at the specified index.

c#
public static int GetInt32(this Byte[] bytes, int index);

View source

Parameters ​

NameTypeDescription
bytesByte[]
indexInt32The zero-based index to read from.

Returns ​

Int32

The Int32 value.

GetInt32(Byte[], Int32, Endian) ​

Reads an Int32 from a byte array at the specified index using the specified endianness.

c#
public static int GetInt32(this Byte[] bytes, int index, Endian endian);

View source

Parameters ​

NameTypeDescription
bytesByte[]
indexInt32The zero-based index to read from.
endianEndianThe endianness to use.

Returns ​

Int32

The Int32 value.