MarshalAsAttribute 建構函式

定義

初始化 MarshalAsAttribute 類別的新執行個體。

多載

MarshalAsAttribute(Int16)

使用指定的 UnmanagedType 值,初始化 MarshalAsAttribute 類別的新執行個體。

MarshalAsAttribute(UnmanagedType)

使用指定的 MarshalAsAttribute 列舉型別 (Enumeration) 成員,初始化 UnmanagedType 類別的新執行個體。

MarshalAsAttribute(Int16)

來源:
MarshalAsAttribute.cs
來源:
MarshalAsAttribute.cs
來源:
MarshalAsAttribute.cs

使用指定的 UnmanagedType 值,初始化 MarshalAsAttribute 類別的新執行個體。

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

要將資料封送處理成的值。

備註

此建構函式會採用代表每個 UnmanagedType 列舉成員的基礎 16 位帶正負號整數。 Tlbimp.exe (型別程式庫匯入工具) 使用此建構函式。

另請參閱

適用於

MarshalAsAttribute(UnmanagedType)

來源:
MarshalAsAttribute.cs
來源:
MarshalAsAttribute.cs
來源:
MarshalAsAttribute.cs

使用指定的 MarshalAsAttribute 列舉型別 (Enumeration) 成員,初始化 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

要將資料封送處理成的值。

備註

對於較不容易出錯的可讀取程式碼,請一律使用此建構函式。

另請參閱

適用於