UIntPtr UIntPtr UIntPtr UIntPtr Constructors

定義

多載

UIntPtr(UInt32) UIntPtr(UInt32) UIntPtr(UInt32) UIntPtr(UInt32)

使用指定的 32 位元指標或控制代碼來初始化 UIntPtr 結構的新執行個體。Initializes a new instance of the UIntPtr structure using the specified 32-bit pointer or handle.

UIntPtr(UInt64) UIntPtr(UInt64) UIntPtr(UInt64) UIntPtr(UInt64)

使用指定的 64 位元指標或控制代碼來初始化 UIntPtr 的新執行個體。Initializes a new instance of UIntPtr using the specified 64-bit pointer or handle.

UIntPtr(Void*) UIntPtr(Void*) UIntPtr(Void*)

對未指定的類型使用指定的指標,初始化 UIntPtr 的新執行個體。Initializes a new instance of UIntPtr using the specified pointer to an unspecified type.

UIntPtr(UInt32) UIntPtr(UInt32) UIntPtr(UInt32) UIntPtr(UInt32)

使用指定的 32 位元指標或控制代碼來初始化 UIntPtr 結構的新執行個體。Initializes a new instance of the UIntPtr structure using the specified 32-bit pointer or handle.

public:
 UIntPtr(System::UInt32 value);
public UIntPtr (uint value);
new unativeint : uint32 -> unativeint
Public Sub New (value As UInteger)

參數

value
UInt32 UInt32 UInt32 UInt32

包含在 32 位元不帶正負號整數中的指標或控制代碼。A pointer or handle contained in a 32-bit unsigned integer.

UIntPtr(UInt64) UIntPtr(UInt64) UIntPtr(UInt64) UIntPtr(UInt64)

使用指定的 64 位元指標或控制代碼來初始化 UIntPtr 的新執行個體。Initializes a new instance of UIntPtr using the specified 64-bit pointer or handle.

public:
 UIntPtr(System::UInt64 value);
public UIntPtr (ulong value);
new unativeint : uint64 -> unativeint
Public Sub New (value As ULong)

參數

value
UInt64 UInt64 UInt64 UInt64

包含在 64 位元不帶正負號整數中的指標或控制代碼。A pointer or handle contained in a 64-bit unsigned integer.

例外狀況

在 32 位元的平台上,value 太大,以致於無法代表 UIntPtrOn a 32-bit platform, value is too large to represent as an UIntPtr.

備註

只有當的值value需要比目前平臺支援的位數更多時,才會擲回例外狀況。An exception is only thrown if the value of value requires more bits than the current platform supports.

UIntPtr(Void*) UIntPtr(Void*) UIntPtr(Void*)

重要

此 API 不符合 CLS 規範。

對未指定的類型使用指定的指標,初始化 UIntPtr 的新執行個體。Initializes a new instance of UIntPtr using the specified pointer to an unspecified type.

public:
 UIntPtr(void* value);
[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
public UIntPtr (void* value);
new unativeint : nativeptr<unit> -> unativeint

參數

value
Void*

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

安全性

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

另請參閱

適用於