UmlExtensions.GetRelatedElements<T> Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Get the elements that are linked to this element through relationships of type T. T can be any relationship type, such as IAssociation or IGeneralization.

Namespace:  Microsoft.VisualStudio.Uml.Extensions
Assembly:  Microsoft.VisualStudio.Uml.Extensions (in Microsoft.VisualStudio.Uml.Extensions.dll)


<ExtensionAttribute> _
Public Shared Function GetRelatedElements(Of T As IRelationship) ( _
    element As IElement _
) As IEnumerable(Of IElement)
Dim element As IElement
Dim returnValue As IEnumerable(Of IElement)

returnValue = element.GetRelatedElements()
public static IEnumerable<IElement> GetRelatedElements<T>(
    this IElement element
where T : IRelationship
generic<typename T>
where T : IRelationship
static IEnumerable<IElement^>^ GetRelatedElements(
    IElement^ element
static member GetRelatedElements : 
        element:IElement -> IEnumerable<IElement>  when 'T : IRelationship
JScript does not support generic types or methods.

Type Parameters

  • T


Return Value

Type: System.Collections.Generic.IEnumerable<IElement>
Collection of IElement at the opposite end of the link

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also


UmlExtensions Class

UmlExtensions Members

Microsoft.VisualStudio.Uml.Extensions Namespace