IInheritanceService.GetInheritanceAttribute(IComponent) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得指定元件的繼承屬性。
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 反映指定元件的繼承層級的 。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應