title: Changing the port of the System.Uri
body: <p>So I have this <code>Uri</code> object which contains an address, something like <code>http://localhost:1000/blah/blah/blah</code>. I need to change the port number and leave all other parts of the address intact. Let's say I need it to be <code>http://localhost:1080/blah/blah/blah</code>.</p>
  
  <p>The <code>Uri</code> objects are pretty much immutable, so I can access the port number through the <code>Port</code> property, but it's read-only. Is there any sane way to create an <code>Uri</code> object exactly like another but with different port? By "sane" I mean "without messing around with regular expressions and string manipulations" because while it's trivial for the example above, it still smells like a can of worms to me. If that's the only way, I really hope that it's already implemented by someone and there are some helpers out there maybe (I didn't find any though)</p>
  
  <p>Thanks in advance.</p>