GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoLink Class / GetOtherPort Method / GetOtherPort(IGoLink,IGoPort) Method
an IGoLink
an IGoPort that the link l is connected to
In This Topic
    GetOtherPort(IGoLink,IGoPort) Method
    In This Topic
    Return the IGoPort of an IGoLink other than the given one.
    Syntax
    public static IGoPort GetOtherPort( 
       IGoLink l,
       IGoPort p
    )

    Parameters

    l
    an IGoLink
    p
    an IGoPort that the link l is connected to

    Return Value

    An IGoPort, that may be null if the other end of the link is not connected, or that may return the same p if both ends of the link are connected to the same port.
    Remarks
    If neither this link's FromPort nor its ToPort is the given port p, this will return either the FromPort or the ToPort, whichever is farther away. Otherwise this will return null.
    See Also