System.ComponentModel.Design.IInheritanceService.GetInheritanceAttribute Method

Gets the inheritance attribute for the specified component.

Syntax

public System.ComponentModel.InheritanceAttribute GetInheritanceAttribute (System.ComponentModel.IComponent component)

Parameters

component
The System.ComponentModel.IComponent for which to retrieve the inheritance attribute.

Returns

An instance of System.ComponentModel.InheritanceAttribute that describes the level of inheritance of the specified component.

Remarks

If the component has been profiled by the IInheritanceService.AddInheritedComponents(System.ComponentModel.IComponent, System.ComponentModel.IContainer) method, this method returns the value System.ComponentModel.InheritanceAttribute.NotInherited. Otherwise, it returns the inheritance attribute for this component.

You should call IInheritanceService.AddInheritedComponents(System.ComponentModel.IComponent, System.ComponentModel.IContainer) on the specified component or a parent of the specified component before attempting to obtain an System.ComponentModel.InheritanceAttribute that reflects the inheritance level of the specified component.

Requirements

Namespace: System.ComponentModel.Design
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0