I came across a situation recently in which I was working with Silverlight and the navigation property of a HyperLink Button required a URI instead of a URL.

To do this, it’s very simple:

string myUrl = "http://AllThingsDotNet.net";
Uri myUri = new Uri(myUrl);
Dim myUrl As String = "http://AllThingsDotNet.net"
Dim myUri As Uri = New Uri(myUrl)