Share via


IInheritanceService.GetInheritanceAttribute(IComponent) 方法

定義

取得指定元件的繼承屬性。

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

參數

component
IComponent

擷取繼承屬性的 IComponent

傳回

InheritanceAttribute 的執行個體,描述指定元件的繼承層級。

備註

如果元件已由 AddInheritedComponents 方法進行分析,這個方法會傳回 值 InheritanceAttribute.NotInherited。 否則,它會傳回這個元件的繼承屬性。

您應該先呼叫 AddInheritedComponents 指定的元件或指定元件的父代,再嘗試取得 InheritanceAttribute 反映指定元件的繼承層級的 。

適用於

另請參閱