C# Uri

Uri class is used to generate a standard URL address.

using System;
Uri u = new Uri("C:\\Users");
var c = u.AbsoluteUri; //file:///C:/Users

Uri class can be used to change a relative address to an absolute address.
Uri u = new Uri("http://www.endmemo.com");
Uri u2 = new Uri(u,"csharp/uri.php"); //u2.ToString() = http://www.endmemo.com/csharp/uri.php



endmemo.com © 2024  | Terms of Use | Privacy | Home