IntPtr 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 IntPtr 的新執行個體。
多載
| 名稱 | Description |
|---|---|
| IntPtr(Int32) |
初始化一個使用指定 32 位元有符號整數的新實例 IntPtr 。 |
| IntPtr(Int64) |
初始化使用指定 64 位元有號整數的新實例 IntPtr 。 |
| IntPtr(Void*) |
初始化使用指定指標指向未指定型態的新實例 IntPtr 。 |
IntPtr(Int64)
- 來源:
- IntPtr.cs
- 來源:
- IntPtr.cs
- 來源:
- IntPtr.cs
- 來源:
- IntPtr.cs
- 來源:
- IntPtr.cs
初始化使用指定 64 位元有號整數的新實例 IntPtr 。
public:
IntPtr(long value);
public IntPtr(long value);
new nativeint : int64 -> nativeint
Public Sub New (value As Long)
參數
- value
- Int64
64 位帶正負號的整數。
例外狀況
在 32 位元程序中, 表示 value 為 IntPtr。
備註
只有當 的 value 值需要比執行程序支援的位元更多時,才會拋出例外。
適用於
IntPtr(Void*)
- 來源:
- IntPtr.cs
- 來源:
- IntPtr.cs
- 來源:
- IntPtr.cs
- 來源:
- IntPtr.cs
- 來源:
- IntPtr.cs
重要
此 API 不符合 CLS 規範。
初始化使用指定指標指向未指定型態的新實例 IntPtr 。
public:
IntPtr(void* value);
[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
public IntPtr(void* value);
[System.CLSCompliant(false)]
public IntPtr(void* value);
[<System.CLSCompliant(false)>]
[<System.Security.SecurityCritical>]
new nativeint : nativeptr<unit> -> nativeint
[<System.CLSCompliant(false)>]
new nativeint : nativeptr<unit> -> nativeint
參數
- value
- Void*
一個指向未指定型態的指標。
- 屬性