This documentation is archived and is not being maintained.

IntPtr.ToInt32 Method

Converts the value of this instance to a 32-bit signed integer.

[Visual Basic]
Public Function ToInt32() As Integer
public int ToInt32();
public: int ToInt32();
public function ToInt32() : int;

Return Value

A 32-bit signed integer equal to the value of this instance.


Exception Type Condition
OverflowException On a 64-bit platform, the value of this instance is too large or too small to represent as a 32-bit signed integer.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

IntPtr Structure | IntPtr Members | System Namespace