InterfaceTypeAttribute 构造函数

定义

初始化 InterfaceTypeAttribute 类的新实例。Initializes a new instance of the InterfaceTypeAttribute class.

重载

InterfaceTypeAttribute(Int16)

使用指定的 ComInterfaceType 枚举成员初始化 InterfaceTypeAttribute 类的新实例。Initializes a new instance of the InterfaceTypeAttribute class with the specified ComInterfaceType enumeration member.

InterfaceTypeAttribute(ComInterfaceType)

使用指定的 ComInterfaceType 枚举成员初始化 InterfaceTypeAttribute 类的新实例。Initializes a new instance of the InterfaceTypeAttribute class with the specified ComInterfaceType enumeration member.

InterfaceTypeAttribute(Int16)

使用指定的 ComInterfaceType 枚举成员初始化 InterfaceTypeAttribute 类的新实例。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.

注解

此构造函数采用表示每个枚举成员的基础16位整数 ComInterfaceTypeThis 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)

使用指定的 ComInterfaceType 枚举成员初始化 InterfaceTypeAttribute 类的新实例。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.

适用于