UIntPtr.Explicit 运算符

定义

重载

Explicit(UInt32 to UIntPtr)

将 32 位无符号整数的值转换成 UIntPtrConverts the value of a 32-bit unsigned integer to an UIntPtr.

Explicit(UInt64 to UIntPtr)

将 64 位无符号整数的值转换成 UIntPtrConverts the value of a 64-bit unsigned integer to an UIntPtr.

Explicit(UIntPtr to UInt32)

将指定的 UIntPtr 的值转换为 32 位无符号整数。Converts the value of the specified UIntPtr to a 32-bit unsigned integer.

Explicit(UIntPtr to UInt64)

将指定的 UIntPtr 的值转换为 64 位无符号整数。Converts the value of the specified UIntPtr to a 64-bit unsigned integer.

Explicit(UIntPtr to Void*)

将指定的 UIntPtr 的值转换为指向未指定类型的指针。Converts the value of the specified UIntPtr to a pointer to an unspecified type.

此 API 不兼容 CLS。This API is not CLS-compliant.

Explicit(Void* to UIntPtr)

将指向未指定类型的指定指针转换为 UIntPtrConverts the specified pointer to an unspecified type to an UIntPtr.

此 API 不兼容 CLS。This API is not CLS-compliant.

Explicit(UInt32 to UIntPtr)

将 32 位无符号整数的值转换成 UIntPtrConverts the value of a 32-bit unsigned integer to an UIntPtr.

public:
 static explicit operator UIntPtr(System::UInt32 value);
public static explicit operator UIntPtr (uint value);
static member op_Explicit : uint32 -> unativeint
Public Shared Narrowing Operator CType (value As UInteger) As UIntPtr

参数

value
UInt32

32 位无符号整数。A 32-bit unsigned integer.

返回

UIntPtr

初始化为 UIntPtrvalue 新实例。A new instance of UIntPtr initialized to value.

另请参阅

适用于

Explicit(UInt64 to UIntPtr)

将 64 位无符号整数的值转换成 UIntPtrConverts the value of a 64-bit unsigned integer to an UIntPtr.

public:
 static explicit operator UIntPtr(System::UInt64 value);
public static explicit operator UIntPtr (ulong value);
static member op_Explicit : uint64 -> unativeint
Public Shared Narrowing Operator CType (value As ULong) As UIntPtr

参数

value
UInt64

64 位无符号整数。A 64-bit unsigned integer.

返回

UIntPtr

初始化为 UIntPtrvalue 新实例。A new instance of UIntPtr initialized to value.

例外

在 32 位的平台上,value 太大,无法表示为一个 UIntPtrOn a 32-bit platform, value is too large to represent as an UIntPtr.

另请参阅

适用于

Explicit(UIntPtr to UInt32)

将指定的 UIntPtr 的值转换为 32 位无符号整数。Converts the value of the specified UIntPtr to a 32-bit unsigned integer.

public:
 static explicit operator System::UInt32(UIntPtr value);
public static explicit operator uint (UIntPtr value);
static member op_Explicit : unativeint -> uint32
Public Shared Narrowing Operator CType (value As UIntPtr) As UInteger

参数

value
UIntPtr

要转换的指针或句柄。The pointer or handle to convert.

返回

UInt32

value 的内容。The contents of value.

例外

在 64 位平台上,value 的值太大,无法表示为 32 位无符号整数。On a 64-bit platform, the value of value is too large to represent as a 32-bit unsigned integer.

注解

仅当的值 value 需要比当前平台支持的更多位时,才会引发异常。An exception is only thrown if the value of value requires more bits than the current platform supports.

另请参阅

适用于

Explicit(UIntPtr to UInt64)

将指定的 UIntPtr 的值转换为 64 位无符号整数。Converts the value of the specified UIntPtr to a 64-bit unsigned integer.

public:
 static explicit operator System::UInt64(UIntPtr value);
public static explicit operator ulong (UIntPtr value);
static member op_Explicit : unativeint -> uint64
Public Shared Narrowing Operator CType (value As UIntPtr) As ULong

参数

value
UIntPtr

要转换的指针或句柄。The pointer or handle to convert.

返回

UInt64

value 的内容。The contents of value.

另请参阅

适用于

Explicit(UIntPtr to Void*)

重要

此 API 不符合 CLS。

将指定的 UIntPtr 的值转换为指向未指定类型的指针。Converts the value of the specified UIntPtr to a pointer to an unspecified type.

此 API 不兼容 CLS。This API is not CLS-compliant.

public:
 static explicit operator void*(UIntPtr value);
[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
public static explicit operator void* (UIntPtr value);
public static explicit operator void* (UIntPtr value);
[System.CLSCompliant(false)]
public static explicit operator void* (UIntPtr value);
[<System.CLSCompliant(false)>]
[<System.Security.SecurityCritical>]
static member op_Explicit : unativeint -> nativeptr<unit>
static member op_Explicit : unativeint -> nativeptr<unit>
[<System.CLSCompliant(false)>]
static member op_Explicit : unativeint -> nativeptr<unit>

参数

value
UIntPtr

要转换的指针或句柄。The pointer or handle to convert.

返回

Void*

value 的内容。The contents of value.

属性

另请参阅

适用于

Explicit(Void* to UIntPtr)

重要

此 API 不符合 CLS。

将指向未指定类型的指定指针转换为 UIntPtrConverts the specified pointer to an unspecified type to an UIntPtr.

此 API 不兼容 CLS。This API is not CLS-compliant.

public:
 static explicit operator UIntPtr(void* value);
[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
public static explicit operator UIntPtr (void* value);
public static explicit operator UIntPtr (void* value);
[System.CLSCompliant(false)]
public static explicit operator UIntPtr (void* value);
[<System.CLSCompliant(false)>]
[<System.Security.SecurityCritical>]
static member op_Explicit : nativeptr<unit> -> unativeint
static member op_Explicit : nativeptr<unit> -> unativeint
[<System.CLSCompliant(false)>]
static member op_Explicit : nativeptr<unit> -> unativeint

参数

value
Void*

指向未指定类型的指针。A pointer to an unspecified type.

返回

UIntPtr

初始化为 UIntPtrvalue 新实例。A new instance of UIntPtr initialized to value.

属性

另请参阅

适用于