A new System.Uri accepts data in its constructor. Any subsequent usage of this object is on a read-only basis. A new System.UriBuilder supports read-write assignments after construction.
From Microsoft, “The UriBuilder class provides a convenient way to modify the contents of a Uri instance without creating a new Uri instance for each modification.” More information:
http://msdn2.microsoft.com/en-us/library/system.uribuilder.aspx
The “contents” of the Uri are exposed by the UriBuilder as shown in PowerShell like this:
Fragment : #hash Host : localhost Password : MyPassword Path : /Folder1/Folder2 Port : 999 Query : ?var1=foo&var2=bar Scheme : http Uri : http://User1:MyPassword@localhost:999/Folder1/Folder2 ?var1=foo&var2=bar#hash UserName : User1
You should be able to see that all the members of UriBuilder (except UriBuilder.Uri) are used to “build” UriBuilder.Uri.