The port number defines the protocol port used for contacting the server referenced in the URI. If a port is not specified as part of the URI, the Port property returns the default value for the protocol. If there is no default port number, this property returns -1.
Uri baseUri = new Uri("http://www.contoso.com/");
Uri myUri = new Uri(baseUri,"catalog/shownew.htm?date=today");
outputBlock.Text += "Uri.Port: ";
outputBlock.Text += myUri.Port;
outputBlock.Text += "\n";