Share via


IElement.OwnedComments Property

Gets Comments contained in this element (not comments linked to it).

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

Syntax

'Declaration
ReadOnly Property OwnedComments As IEnumerable(Of IComment)
IEnumerable<IComment> OwnedComments { get; }
property IEnumerable<IComment^>^ OwnedComments {
    IEnumerable<IComment^>^ get ();
}
abstract OwnedComments : IEnumerable<IComment> with get
function get OwnedComments () : IEnumerable<IComment>

Property Value

Type: System.Collections.Generic.IEnumerable<IComment>

Remarks

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

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

.NET Framework Security

See Also

Reference

IElement Interface

Microsoft.VisualStudio.Uml.Classes Namespace