Share via


IInheritanceService.GetInheritanceAttribute(IComponent) Método

Definição

Obtém o atributo de herança para o componente especificado.

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

Parâmetros

component
IComponent

O IComponent para o qual recuperar o atributo de herança.

Retornos

Uma instância de InheritanceAttribute que descreve o nível de herança do componente especificado.

Comentários

Se o componente tiver sido criado pelo AddInheritedComponents método , esse método retornará o valor InheritanceAttribute.NotInherited. Caso contrário, ele retornará o atributo de herança para esse componente.

Você deve chamar AddInheritedComponents no componente especificado ou um pai do componente especificado antes de tentar obter um InheritanceAttribute que reflita o nível de herança do componente especificado.

Aplica-se a

Confira também