共用方式為


IComment.AnnotatedElements 屬性

取得註解所附加的元素。

命名空間:  Microsoft.VisualStudio.Uml.Classes
組件:  Microsoft.VisualStudio.Uml.Interfaces (在 Microsoft.VisualStudio.Uml.Interfaces.dll 中)

語法

'宣告
ReadOnly Property AnnotatedElements As IList(Of IElement)
IList<IElement> AnnotatedElements { get; }
property IList<IElement^>^ AnnotatedElements {
    IList<IElement^>^ get ();
}
abstract AnnotatedElements : IList<IElement>
function get AnnotatedElements () : IList<IElement>

屬性值

型別:System.Collections.Generic.IList<IElement>

備註

若要取得某一特定 element 已連結的註解,請使用:

IEnumerable
<IComment> comments = store.AllInstances<IComment>() 
.Where(eachComment => eachComment.AnnotatedElements.Contains(element));

.NET Framework 安全性

請參閱

參考

IComment 介面

Microsoft.VisualStudio.Uml.Classes 命名空間