UIntPtr 建構函式

定義

初始化 UIntPtr 的新執行個體。

多載

UIntPtr(UInt32)

使用指定的 32 位不帶正負號的整數, UIntPtr 初始化 結構的新實例。

UIntPtr(UInt64)

使用指定的 64 位不帶正負號的整數,初始化 的新實例 UIntPtr

UIntPtr(Void*)

對未指定的類型使用指定的指標,初始化 UIntPtr 的新執行個體。

UIntPtr(UInt32)

Source:
UIntPtr.cs
Source:
UIntPtr.cs
Source:
UIntPtr.cs

使用指定的 32 位不帶正負號的整數, UIntPtr 初始化 結構的新實例。

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

參數

value
UInt32

32 位元不帶正負號的整數。

適用於

UIntPtr(UInt64)

Source:
UIntPtr.cs
Source:
UIntPtr.cs
Source:
UIntPtr.cs

使用指定的 64 位不帶正負號的整數,初始化 的新實例 UIntPtr

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

參數

value
UInt64

64 位元不帶正負號的整數。

例外狀況

在 32 位進程中, value 太大而無法以 表示。 UIntPtr

備註

只有在 的值 value 需要比執行進程支援更多的位時,才會擲回例外狀況。

適用於

UIntPtr(Void*)

Source:
UIntPtr.cs
Source:
UIntPtr.cs
Source:
UIntPtr.cs

重要

此 API 不符合 CLS 規範。

對未指定的類型使用指定的指標,初始化 UIntPtr 的新執行個體。

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

參數

value
Void*

未指定的類型之指標。

屬性

另請參閱

適用於