InterfaceTypeAttribute 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 InterfaceTypeAttribute 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| InterfaceTypeAttribute(Int16) |
初始化一個新的類別實例 InterfaceTypeAttribute ,並使用指定的 ComInterfaceType 列舉成員。 |
| InterfaceTypeAttribute(ComInterfaceType) |
初始化一個新的類別實例 InterfaceTypeAttribute ,並使用指定的 ComInterfaceType 列舉成員。 |
InterfaceTypeAttribute(Int16)
初始化一個新的類別實例 InterfaceTypeAttribute ,並使用指定的 ComInterfaceType 列舉成員。
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 用戶端。
備註
此建構子取一個底層 16 位元整數,代表每個 ComInterfaceType 枚舉成員。 Tlbimp.exe(類型庫匯入器)使用此構造子。
另請參閱
適用於
InterfaceTypeAttribute(ComInterfaceType)
初始化一個新的類別實例 InterfaceTypeAttribute ,並使用指定的 ComInterfaceType 列舉成員。
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 用戶端的值之一。
備註
對於較不易出錯的可讀程式碼,請始終使用此建構子。