IntPtr.Explicit 操作员  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| Explicit(Void* to IntPtr) | 
						 将指向未指定类型的指定指针转换为 IntPtr。 此 API 不兼容 CLS。  | 
        	
| Explicit(IntPtr to Int64) | 
						 将指定的 IntPtr 的值转换为 64 位有符号整数。  | 
        	
| Explicit(IntPtr to Void*) | 
						 将指定的 IntPtr 的值转换为指向未指定类型的指针。 此 API 不兼容 CLS。  | 
        	
| Explicit(Int64 to IntPtr) | 
						 将 64 位有符号整数值转换为 IntPtr。  | 
        	
| Explicit(IntPtr to Int32) | 
						 将指定的 IntPtr 的值转换为 32 位有符号整数。  | 
        	
| Explicit(Int32 to IntPtr) | 
						 将 32 位有符号整数的值转换为 IntPtr。  | 
        	
Explicit(Void* to IntPtr)
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
重要
此 API 不符合 CLS。
将指向未指定类型的指定指针转换为 IntPtr。
此 API 不兼容 CLS。
public:
 static explicit operator IntPtr(void* value);
	[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
public static explicit operator IntPtr(void* value);
	[System.CLSCompliant(false)]
public static explicit operator IntPtr(void* value);
	[<System.CLSCompliant(false)>]
[<System.Security.SecurityCritical>]
static member op_Explicit : nativeptr<unit> -> nativeint
	[<System.CLSCompliant(false)>]
static member op_Explicit : nativeptr<unit> -> nativeint
	参数
- value
 - Void*
 
指向未指定类型的指针。
返回
nativeint
初始化为 IntPtr 的 value 新实例。
- 属性
 
另请参阅
适用于
Explicit(IntPtr to Int64)
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
将指定的 IntPtr 的值转换为 64 位有符号整数。
public:
 static explicit operator long(IntPtr value);
	public static explicit operator long(IntPtr value);
	static member op_Explicit : nativeint -> int64
	Public Shared Narrowing Operator CType (value As IntPtr) As Long
	参数
- value
 - 
				
				IntPtr
nativeint
 
要转换的带符号整数。
返回
              value 的内容。
另请参阅
适用于
Explicit(IntPtr to Void*)
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
重要
此 API 不符合 CLS。
将指定的 IntPtr 的值转换为指向未指定类型的指针。
此 API 不兼容 CLS。
public:
 static explicit operator void*(IntPtr value);
	[System.CLSCompliant(false)]
public static explicit operator void*(IntPtr value);
	[<System.CLSCompliant(false)>]
static member op_Explicit : nativeint -> nativeptr<unit>
	参数
- value
 - 
				
				IntPtr
nativeint
 
要转换的带符号整数。
返回
              value 的内容。
- 属性
 
另请参阅
适用于
Explicit(Int64 to IntPtr)
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
将 64 位有符号整数值转换为 IntPtr。
public:
 static explicit operator IntPtr(long value);
	public static explicit operator IntPtr(long value);
	static member op_Explicit : int64 -> nativeint
	Public Shared Narrowing Operator CType (value As Long) As IntPtr
	参数
- value
 - Int64
 
64 位带符号整数。
返回
nativeint
初始化为 IntPtr 的 value 新实例。
例外
在 32 位进程中, value 太大,无法表示为 IntPtr。
另请参阅
适用于
Explicit(IntPtr to Int32)
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
将指定的 IntPtr 的值转换为 32 位有符号整数。
public:
 static explicit operator int(IntPtr value);
	public static explicit operator int(IntPtr value);
	static member op_Explicit : nativeint -> int
	Public Shared Narrowing Operator CType (value As IntPtr) As Integer
	参数
- value
 - 
				
				IntPtr
nativeint
 
要转换的带符号整数。
返回
              value 的内容。
例外
在 64 位进程中, 的值 value 太大,无法表示为 32 位带符号整数。
注解
仅当 的值 value 所需的位数超过执行进程所支持的位数时,才会引发异常。
另请参阅
适用于
Explicit(Int32 to IntPtr)
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
- Source:
 - IntPtr.cs
 
将 32 位有符号整数的值转换为 IntPtr。
public:
 static explicit operator IntPtr(int value);
	public static explicit operator IntPtr(int value);
	static member op_Explicit : int -> nativeint
	Public Shared Narrowing Operator CType (value As Integer) As IntPtr
	参数
- value
 - Int32
 
32 位带符号整数。
返回
nativeint
初始化为 IntPtr 的 value 新实例。