Uri Class Provides an object representation of a uniform resource identifier (URI) and easy access to the parts of the URI. : URI « Network « C# / C Sharp
Uri Class Provides an object representation of a uniform resource identifier (URI) and easy access to the parts of the URI.
using System;
publicclass MainClass{
publicstaticvoid Main(){
Uri uri = new Uri("http://myUrl/%2E%2E/%2E%2E");
Console.WriteLine(uri.AbsoluteUri);
Console.WriteLine(uri.PathAndQuery);
uri = new Uri("ftp://myUrl/%2E%2E/%2E%2E");
Console.WriteLine(uri.AbsoluteUri);
Console.WriteLine(uri.PathAndQuery);
}
}