BitConverter::ToInt32 Method
Returns a 32-bit signed integer converted from four bytes at a specified position in a byte array.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- value
- Type: array<System::Byte>
An array of bytes.
- startIndex
- Type: System::Int32
The starting position within value.
Return Value
Type: System::Int32A 32-bit signed integer formed by four bytes beginning at startIndex.
| Exception | Condition |
|---|---|
| ArgumentException | startIndex is greater than or equal to the length of value minus 3, and is less than or equal to the length of value minus 1. |
| ArgumentNullException | value is nullptr. |
| ArgumentOutOfRangeException | startIndex is less than zero or greater than the length of value minus 1. |
The ToInt32 method converts the bytes from index startIndex to startIndex + 3 to an Int32 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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.