The source code to demonstrate the use of AbsolutePath property of Uri class is given below. The given program is compiled and executed successfully.
using System;
class UriExample
{
//Entry point of Program
static public void Main()
{
Uri domainUri;
Uri newUri;
domainUri = new Uri("http://www.includehelp.com/");
newUri = new Uri(domainUri, "Article/CPrograms.html");
System.Console.WriteLine("Absolute path: "+newUri.AbsolutePath);
}
}
Output:
Absolute path: /Article/CPrograms.html
Press any key to continue . . .
Here, we got an absolute path using the AbsolutePath property of the newUri object.
Program:
The source code to demonstrate the use of AbsolutePath property of Uri class is given below. The given program is compiled and executed successfully.
Output:
Here, we got an absolute path using the AbsolutePath property of the newUri object.
need an explanation for this answer? contact us directly to get an explanation for this answer