InterfaceTypeAttribute 建構函式

定義

初始化 InterfaceTypeAttribute 類別的新執行個體。Initializes a new instance of the InterfaceTypeAttribute class.

多載

InterfaceTypeAttribute(Int16)

使用指定的 InterfaceTypeAttribute 列舉型別 (Enumeration) 成員,初始化 ComInterfaceType 類別的新執行個體。Initializes a new instance of the InterfaceTypeAttribute class with the specified ComInterfaceType enumeration member.

InterfaceTypeAttribute(ComInterfaceType)

使用指定的 InterfaceTypeAttribute 列舉型別 (Enumeration) 成員,初始化 ComInterfaceType 類別的新執行個體。Initializes a new instance of the InterfaceTypeAttribute class with the specified ComInterfaceType enumeration member.

InterfaceTypeAttribute(Int16)

使用指定的 InterfaceTypeAttribute 列舉型別 (Enumeration) 成員,初始化 ComInterfaceType 類別的新執行個體。Initializes a new instance of the InterfaceTypeAttribute class with the specified ComInterfaceType enumeration member.

public:
 InterfaceTypeAttribute(short interfaceType);
public InterfaceTypeAttribute (short interfaceType);
new System.Runtime.InteropServices.InterfaceTypeAttribute : int16 -> System.Runtime.InteropServices.InterfaceTypeAttribute
Public Sub New (interfaceType As Short)

參數

interfaceType
Int16

描述介面應如何公開給 COM 用戶端。Describes how the interface should be exposed to COM clients.

備註

此函式會採用代表每個 ComInterfaceType 列舉成員的基礎16位整數。This constructor takes an underlying 16-bit integer that represents each ComInterfaceType enumeration member. Tlbimp.exe (類型程式庫匯入工具)會使用這個函式。The Tlbimp.exe (Type Library Importer) uses this constructor.

另請參閱

InterfaceTypeAttribute(ComInterfaceType)

使用指定的 InterfaceTypeAttribute 列舉型別 (Enumeration) 成員,初始化 ComInterfaceType 類別的新執行個體。Initializes a new instance of the InterfaceTypeAttribute class with the specified ComInterfaceType enumeration member.

public:
 InterfaceTypeAttribute(System::Runtime::InteropServices::ComInterfaceType interfaceType);
public InterfaceTypeAttribute (System.Runtime.InteropServices.ComInterfaceType interfaceType);
new System.Runtime.InteropServices.InterfaceTypeAttribute : System.Runtime.InteropServices.ComInterfaceType -> System.Runtime.InteropServices.InterfaceTypeAttribute
Public Sub New (interfaceType As ComInterfaceType)

參數

interfaceType
ComInterfaceType

其中一個 ComInterfaceType 值,描述介面應如何公開給 COM 用戶端。One of the ComInterfaceType values that describes how the interface should be exposed to COM clients.

備註

對於較不容易發生錯誤的可讀取程式碼,請一律使用此函式。For readable code that is less prone to error, always use this constructor.

適用於