C# Program to Demonstrate the Use of Authority Property of URI Class

You are currently viewing C# Program to Demonstrate the Use of Authority Property of URI Class

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

using System;

class UriExample
{
    //Entry point of Program
    static public void Main()
    {
        Uri domainUri;
        Uri newUri;

        domainUri = new Uri("http://www.includehelp.com:8082");
        newUri = new Uri(domainUri, "CPrograms.html");

        System.Console.WriteLine("Authority Information: " + newUri.Authority);
    }
}
Authority Information: www.includehelp.com:8082
Press any key to continue . . .

Ranjith Kumar

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply