GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoLink Class / GetOtherNode Method / GetOtherNode(IGoLink,IGoNode) Method
an IGoLink
an IGoNode that the link l is connected to
In This Topic
    GetOtherNode(IGoLink,IGoNode) Method
    In This Topic
    Return the IGoNode connected to the other end of an IGoLink.
    Syntax
    public static IGoNode GetOtherNode( 
       IGoLink l,
       IGoNode n
    )

    Parameters

    l
    an IGoLink
    n
    an IGoNode that the link l is connected to

    Return Value

    An IGoNode, that may be null if the other end of the link is not connected or whose port may not be part of a node, or that may return the same n if both ends of the link are connected to the same node, even if at different ports.
    Remarks
    If neither this link's FromPort nor its ToPort is part of the given node n, this will return null.
    See Also