Home » C#

C# | Uri.IsWellFormedOriginalString() Method with Example

Uri.IsWellFormedOriginalString() Method: Here, we are going to learn about the IsWellFormedOriginalString() method of Uri class with example in C#.
Submitted by Nidhi, on March 26, 2020

Uri.IsWellFormedOriginalString() Method

Uri.IsWellFormedOriginalString() method is used to check whether given Uri is well-formed or not, if Uri is well-formed, the method returns true otherwise it returns false.


    bool Uri.IsWellFormedOriginalString();


  • It does not accept any parameter.

Return value:

The return type of this method is boolean, it returns true if specified uri is well-formed, otherwise it returns false.



Example to demonstrate example of Uri.IsWellFormedOriginalString() method

using System;

class UriExample
    //Entry point of Program
    static public void Main()
        // Create some Uri objects
        Uri uri = new Uri("https://www.includehelp.com/");
        if (uri.IsWellFormedOriginalString())
            Console.WriteLine("uri is well-formed.");
            Console.WriteLine("uri is not well-formed.");


uri is well-formed.

Comments and Discussions!

Load comments ↻

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