ComDefaultInterfaceAttribute(Type) 构造函数

定义

以指定的 Type 对象作为向 COM 公开的默认接口初始化 ComDefaultInterfaceAttribute 类的新实例。Initializes a new instance of the ComDefaultInterfaceAttribute class with the specified Type object as the default interface exposed to COM.

public:
 ComDefaultInterfaceAttribute(Type ^ defaultInterface);
public ComDefaultInterfaceAttribute (Type defaultInterface);
new System.Runtime.InteropServices.ComDefaultInterfaceAttribute : Type -> System.Runtime.InteropServices.ComDefaultInterfaceAttribute
Public Sub New (defaultInterface As Type)

参数

defaultInterface
Type

一个 Type 值,指示要向 COM 公开的默认接口。A Type value indicating the default interface to expose to COM.

注解

defaultInterface传递给构造函数的类型必须对 COM 可见。The defaultInterface type passed to the constructor must be visible to COM.

适用于