語言

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 。

適用於

另請參閱