Get a link from a port

Hello,

I have a quick question.
If I have a Node's port (say the Bottom Port) and I know there is a link linked to that port, how can I get to that link.
I tried the following so far:
[code] GoLabeldLink l = Node.BottomPort.Links.Current as GoLabeledLink;[/code]
But It gives me the exception that I am not using Links the appropriate way.
Thanks very much in advance.
Susan

Since there might be more than one link at a port, there is always a collection there. If you just care about the first one:

[code] GoLabeledLink l = null;
foreach (IGoLink link in Node.BottomPort.Links) {
l = link as GoLabeledLink;
break;
}[/code]
Thanks very much Walter.
I tried that and it is working well.
Susan