UIntPtr.Explicit UIntPtr.Explicit UIntPtr.Explicit UIntPtr.Explicit Operator

定義

多載

Explicit(Void* to UIntPtr) Explicit(Void* to UIntPtr) Explicit(Void* to UIntPtr)

將指定的指標轉換為 UIntPtr 的未指定類型。Converts the specified pointer to an unspecified type to an UIntPtr.

此應用程式開發介面不符合 CLS 標準。This API is not CLS-compliant.

Explicit(UIntPtr to UInt64) Explicit(UIntPtr to UInt64) Explicit(UIntPtr to UInt64) Explicit(UIntPtr to UInt64)

將指定的 UIntPtr 值轉換為 64 位元不帶正負號的整數。Converts the value of the specified UIntPtr to a 64-bit unsigned integer.

Explicit(UIntPtr to Void*) Explicit(UIntPtr to Void*) Explicit(UIntPtr to Void*)

將指定的 UIntPtr 值轉換為未指定的類型指標。Converts the value of the specified UIntPtr to a pointer to an unspecified type.

此應用程式開發介面不符合 CLS 標準。This API is not CLS-compliant.

Explicit(UInt64 to UIntPtr) Explicit(UInt64 to UIntPtr) Explicit(UInt64 to UIntPtr) Explicit(UInt64 to UIntPtr)

將 64 位元不帶正負號整數的值轉換為 UIntPtrConverts the value of a 64-bit unsigned integer to an UIntPtr.

Explicit(UInt32 to UIntPtr) Explicit(UInt32 to UIntPtr) Explicit(UInt32 to UIntPtr) Explicit(UInt32 to UIntPtr)

將 32 位元不帶正負號整數的值轉換為 UIntPtrConverts the value of a 32-bit unsigned integer to an UIntPtr.

Explicit(UIntPtr to UInt32) Explicit(UIntPtr to UInt32) Explicit(UIntPtr to UInt32) Explicit(UIntPtr to UInt32)

將指定的 UIntPtr 值轉換為 32 位元不帶正負號的整數。Converts the value of the specified UIntPtr to a 32-bit unsigned integer.

Explicit(Void* to UIntPtr) Explicit(Void* to UIntPtr) Explicit(Void* to UIntPtr)

重要

此 API 不符合 CLS 規範。

將指定的指標轉換為 UIntPtr 的未指定類型。Converts the specified pointer to an unspecified type to an UIntPtr.

此應用程式開發介面不符合 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);
static member op_Explicit : nativeptr<unit> -> unativeint

參數

value
Void*

未指定的類型之指標。A pointer to an unspecified type.

傳回

初始化為 valueUIntPtr 的新執行個體。A new instance of UIntPtr initialized to value.

安全性

SecurityCriticalAttribute
需要完全信任立即呼叫者。requires full trust for the immediate caller. 部分信任或透明的程式碼無法使用這個成員。This member cannot be used by partially trusted or transparent code.

另請參閱

Explicit(UIntPtr to UInt64) Explicit(UIntPtr to UInt64) Explicit(UIntPtr to UInt64) 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 UIntPtr UIntPtr UIntPtr

要轉換的指標或控點。The pointer or handle to convert.

傳回

value 的內容。The contents of value.

另請參閱

Explicit(UIntPtr to Void*) Explicit(UIntPtr to Void*) Explicit(UIntPtr to Void*)

重要

此 API 不符合 CLS 規範。

將指定的 UIntPtr 值轉換為未指定的類型指標。Converts the value of the specified UIntPtr to a pointer to an unspecified type.

此應用程式開發介面不符合 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);
static member op_Explicit : unativeint -> nativeptr<unit>

參數

value
UIntPtr UIntPtr UIntPtr UIntPtr

要轉換的指標或控點。The pointer or handle to convert.

傳回

Void*

value 的內容。The contents of value.

安全性

SecurityCriticalAttribute
需要完全信任立即呼叫者。requires full trust for the immediate caller. 部分信任或透明的程式碼無法使用這個成員。This member cannot be used by partially trusted or transparent code.

另請參閱

Explicit(UInt64 to UIntPtr) Explicit(UInt64 to UIntPtr) Explicit(UInt64 to UIntPtr) 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 UInt64 UInt64 UInt64

64 位元不帶正負號的整數。A 64-bit unsigned integer.

傳回

初始化為 valueUIntPtr 的新執行個體。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(UInt32 to UIntPtr) Explicit(UInt32 to UIntPtr) Explicit(UInt32 to UIntPtr) 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 UInt32 UInt32 UInt32

32 位元不帶正負號的整數。A 32-bit unsigned integer.

傳回

初始化為 valueUIntPtr 的新執行個體。A new instance of UIntPtr initialized to value.

另請參閱

Explicit(UIntPtr to UInt32) Explicit(UIntPtr to UInt32) Explicit(UIntPtr to UInt32) 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 UIntPtr UIntPtr UIntPtr

要轉換的指標或控點。The pointer or handle to convert.

傳回

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.

另請參閱

適用於