Gets the port number of this URI.
using System; public class MainClass { public static void Main() { Uri baseUri = new Uri("http://www.yourDomain.com/"); Uri myUri = new Uri(baseUri, "catalog/shownew.htm?date=today"); Console.WriteLine(myUri.Port); } }