_Type.DeclaringType 属性

定义

为 COM 对象提供对 DeclaringType 属性的与版本无关的访问。Provides COM objects with version-independent access to the DeclaringType property.

public:
 property Type ^ DeclaringType { Type ^ get(); };
public Type DeclaringType { get; }
member this.DeclaringType : Type
Public ReadOnly Property DeclaringType As Type

属性值

声明该成员的类的 Type 对象。The Type object for the class that declares this member. 如果该类型是嵌套类型,则该属性返回封闭类型。If the type is a nested type, this property returns the enclosing type.

注解

此属性用于从非托管代码访问托管类,不应从托管代码调用。This property is for access to managed classes from unmanaged code, and should not be called from managed code.

Type.DeclaringType属性获取声明该成员的类。The Type.DeclaringType property gets the class that declares this member.

适用于