ClassInterfaceAttribute 建構函式

定義

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

多載

ClassInterfaceAttribute(Int16)

使用指定的 ClassInterfaceAttribute 列舉值,初始化 ClassInterfaceType 類別的新執行個體。Initializes a new instance of the ClassInterfaceAttribute class with the specified ClassInterfaceType enumeration value.

ClassInterfaceAttribute(ClassInterfaceType)

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

ClassInterfaceAttribute(Int16)

使用指定的 ClassInterfaceAttribute 列舉值,初始化 ClassInterfaceType 類別的新執行個體。Initializes a new instance of the ClassInterfaceAttribute class with the specified ClassInterfaceType enumeration value.

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

參數

classInterfaceType
Int16

描述為類別所產生的介面型別。Describes the type of interface that is generated for a class.

備註

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

另請參閱

適用於

ClassInterfaceAttribute(ClassInterfaceType)

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

public:
 ClassInterfaceAttribute(System::Runtime::InteropServices::ClassInterfaceType classInterfaceType);
public ClassInterfaceAttribute (System.Runtime.InteropServices.ClassInterfaceType classInterfaceType);
new System.Runtime.InteropServices.ClassInterfaceAttribute : System.Runtime.InteropServices.ClassInterfaceType -> System.Runtime.InteropServices.ClassInterfaceAttribute
Public Sub New (classInterfaceType As ClassInterfaceType)

參數

classInterfaceType
ClassInterfaceType

其中一個 ClassInterfaceType 值,描述為類別產生的介面型別。One of the ClassInterfaceType values that describes the type of interface that is generated for a class.

備註

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

適用於