MarshalAsAttribute 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 MarshalAsAttribute 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| MarshalAsAttribute(Int16) |
初始化一個以指定MarshalAsAttribute值的新UnmanagedType類別實例。 |
| MarshalAsAttribute(UnmanagedType) |
初始化一個新的類別實例 MarshalAsAttribute ,並使用指定的 UnmanagedType 列舉成員。 |
MarshalAsAttribute(Int16)
初始化一個以指定MarshalAsAttribute值的新UnmanagedType類別實例。
public:
MarshalAsAttribute(short unmanagedType);
public MarshalAsAttribute(short unmanagedType);
new System.Runtime.InteropServices.MarshalAsAttribute : int16 -> System.Runtime.InteropServices.MarshalAsAttribute
Public Sub New (unmanagedType As Short)
參數
- unmanagedType
- Int16
數據的價值是要被調集的。
備註
此建構子取一個底層 16 位元有符號整數,代表每個 UnmanagedType 枚舉成員。 Tlbimp.exe(類型庫匯入器)使用此構造子。
另請參閱
適用於
MarshalAsAttribute(UnmanagedType)
初始化一個新的類別實例 MarshalAsAttribute ,並使用指定的 UnmanagedType 列舉成員。
public:
MarshalAsAttribute(System::Runtime::InteropServices::UnmanagedType unmanagedType);
public MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType unmanagedType);
new System.Runtime.InteropServices.MarshalAsAttribute : System.Runtime.InteropServices.UnmanagedType -> System.Runtime.InteropServices.MarshalAsAttribute
Public Sub New (unmanagedType As UnmanagedType)
參數
- unmanagedType
- UnmanagedType
數據的價值是要被調集的。
備註
對於較不易出錯的可讀程式碼,請始終使用此建構子。