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>

备注

获取与给定元素链接的注释,请使用:

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

.NET Framework 安全性

请参见

参考

IComment 接口

Microsoft.VisualStudio.Uml.Classes 命名空间