Q:

C# program to demonstrate the use of AbsolutePath property of Uri class

belongs to collection: C# Uri Class Programs

0

C# program to demonstrate the use of AbsolutePath property of Uri class

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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.

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.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C# Uri Class Programs

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
C# program to demonstrate the use of UriSchemeNews... >>
<< C# program to demonstrate the use of AbsoluteUri p...