System.BitConverter.ToInt32 Method

Returns a 32-bit signed integer converted from four bytes at a specified position in a byte array.

Syntax

public static int ToInt32 (byte[] value, int startIndex)

Parameters

value
An array of bytes.
startIndex
The starting position within value.

Returns

A 32-bit signed integer formed by four bytes beginning at startIndex.

Remarks

The BitConverter.ToInt32(Byte[], int) method converts the bytes from index startIndex to startIndex + 3 to an int value. The order of bytes in the array must reflect the endianness of the computer system's architecture; for more information, see the Remarks section of BitConverter.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0