Changing the port of the System.Uri

Have you considered the UriBuilder class?

http://msdn.microsoft.com/en-us/library/system.uribuilder.aspx

The UriBuilder class provides a convenient way to modify the contents of a Uri instance without creating a new Uri instance for each modification.

The UriBuilder properties provide read/write access to the read-only Uri properties so that they can be modified.

Leave a Comment