IInheritanceService.GetInheritanceAttribute(IComponent) Méthode

Définition

Obtient l'attribut d'héritage du composant spécifié.

public:
 System::ComponentModel::InheritanceAttribute ^ GetInheritanceAttribute(System::ComponentModel::IComponent ^ component);
public System.ComponentModel.InheritanceAttribute GetInheritanceAttribute (System.ComponentModel.IComponent component);
abstract member GetInheritanceAttribute : System.ComponentModel.IComponent -> System.ComponentModel.InheritanceAttribute
Public Function GetInheritanceAttribute (component As IComponent) As InheritanceAttribute

Paramètres

component
IComponent

IComponent pour lequel l'attribut d'héritage doit être récupéré.

Retours

Instance de InheritanceAttribute qui décrit le niveau d'héritage du composant spécifié.

Remarques

Si le composant a été profilé par la AddInheritedComponents méthode , cette méthode retourne la valeur InheritanceAttribute.NotInherited. Sinon, elle retourne l’attribut d’héritage pour ce composant.

Vous devez appeler AddInheritedComponents sur le composant spécifié ou un parent du composant spécifié avant d’essayer d’obtenir un qui reflète le niveau d’héritage InheritanceAttribute du composant spécifié.

S’applique à

Voir aussi