Share via


IComment.AnnotatedElements Property

Gets the elements to which the comment is attached.

Namespace:  Microsoft.VisualStudio.Uml.Classes
Assembly:  Microsoft.VisualStudio.Uml.Interfaces (in Microsoft.VisualStudio.Uml.Interfaces.dll)

Syntax

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

Property Value

Type: System.Collections.Generic.IList<IElement>

Remarks

To get the comments that are linked to a given element, use:

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

.NET Framework Security

See Also

Reference

IComment Interface

Microsoft.VisualStudio.Uml.Classes Namespace