IntPtr.ToInt32 Method

Definition

将此实例的值转换为 32 位有符号整数。Converts the value of this instance to a 32-bit signed integer.

public:
 int ToInt32();
public int ToInt32 ();
member this.ToInt32 : unit -> int
Public Function ToInt32 () As Integer

Returns

Int32

与此实例的值相等的 32 位有符号整数。A 32-bit signed integer equal to the value of this instance.

Exceptions

在 64 位平台上,此实例的值太大或太小,无法表示为一个 32 位有符号的整数。On a 64-bit platform, the value of this instance is too large or too small to represent as a 32-bit signed integer.

Applies to