string to uri net core code example Example: c# string to uri Uri myUri = new Uri("http://www.contoso.com/");