语言

TypeDescriptor.ComObjectType 属性

定义

获取由目标组件表示的组件对象模型 (COM) 对象的类型。

public:
 static property Type ^ ComObjectType { Type ^ get(); };
public static Type ComObjectType { [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("COM type descriptors are not trim-compatible.")] get; }
public static Type ComObjectType { get; }
[<get: System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("COM type descriptors are not trim-compatible.")>]
static member ComObjectType : Type
static member ComObjectType : Type
Public Shared ReadOnly Property ComObjectType As Type

属性值

Type此组件表示的 COM 对象或null非 COM 对象的 COM 对象。

属性

注解

该 ComObjectType 属性返回可以传递给 AddProvider(TypeDescriptionProvider, Type) 方法的类型,以定义 COM 类型的类型说明提供程序。

此类 ComObjectType 中的属性和其他成员替换了已过时 IComNativeDescriptorHandler 接口中的功能。 若要在 COM 对象之间实现映射层,请 TypeDescriptor添加一个 TypeDescriptionProvider 用于处理类型的 ComObjectType映射层。

适用于

另请参阅