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

Here, we are going to demonstrate the use of SchemeDelimiter property of Uri class in C#.Net.
Submitted by Nidhi, on April 14, 2021

Here, we will learn about the SchemeDelimiter property of the Uri class. This is the static property that is used to specify characters that are used in communication protocol to separate protocol scheme from address space of given URI. This property is read-only by nature.

This property returns a string value. That specifies characters to separate communication protocol schemes. Now we will look for an example to demonstrate to get characters.

Program:

The source code to demonstrate the use of SchemeDelimiter 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()
    {
        string uriDelimeter = "";

        uriDelimeter = Uri.SchemeDelimiter;
       
        System.Console.WriteLine("URI Scheme delimeter is : ({0})",uriDelimeter);
    }
}

Output:

URI Scheme delimeter is : (://)

Explanation:

In the above example, SchemeDelimiter property returns string then we store returned value to a string variable and print them on the console screen.

C# Uri Class Programs »




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.