using System;
Uri uri = new Uri(
"https://www.dotnetperls.com/");
// Print properties of Uri instance.
Console.WriteLine(
"AbsolutePath = {0}", uri.AbsolutePath);
Console.WriteLine(
"AbsoluteUri = {0}", uri.AbsoluteUri);
Console.WriteLine(
"Authority = {0}", uri.Authority);
Console.WriteLine(
"DnsSafeHost = {0}", uri.DnsSafeHost);
Console.WriteLine(
"Fragment = {0}", uri.Fragment);
Console.WriteLine(
"Host = {0}", uri.Host);
Console.WriteLine(
"HostNameType = {0}", uri.HostNameType);
Console.WriteLine(
"IsAbsoluteUri = {0}", uri.IsAbsoluteUri);
Console.WriteLine(
"IsDefaultPort = {0}", uri.IsDefaultPort);
Console.WriteLine(
"IsFile = {0}", uri.IsFile);
Console.WriteLine(
"IsLoopback = {0}", uri.IsLoopback);
Console.WriteLine(
"IsUnc = {0}", uri.IsUnc);
Console.WriteLine(
"LocalPath = {0}", uri.LocalPath);
Console.WriteLine(
"OriginalString = {0}", uri.OriginalString);
Console.WriteLine(
"PathAndQuery = {0}", uri.PathAndQuery);
Console.WriteLine(
"Port = {0}", uri.Port);
Console.WriteLine(
"Query = {0}", uri.Query);
Console.WriteLine(
"Scheme = {0}", uri.Scheme);
Console.WriteLine(
"Segments = {0}", string.Join(
",", uri.Segments));
Console.WriteLine(
"UserEscaped = {0}", uri.UserEscaped);
Console.WriteLine(
"UserInfo = {0}", uri.UserInfo);
AbsolutePath = /
AbsoluteUri = https://www.dotnetperls.com/
Authority = www.dotnetperls.com
DnsSafeHost = www.dotnetperls.com
Fragment =
Host = www.dotnetperls.com
HostNameType = Dns
IsAbsoluteUri = True
IsDefaultPort = True
IsFile = False
IsLoopback = False
IsUnc = False
LocalPath = /
OriginalString = https://www.dotnetperls.com/
PathAndQuery = /
Port = 443
Query =
Scheme = https
Segments = /
UserEscaped = False
UserInfo =