×

C# Tutorial

Basics of .Net

C# Basics

C# Fundamentals

C# Operators

C# Loops

C# Type Conversions

C# Exception Handling

C# String Class

C# Arrays

C# List

C# Stack

C# Queue

C# Collections

C# Character Class

C# Class and Object

C# Namespaces

C# Delegates

C# Constructors

C# Inheritance

C# Operator Overloading

C# Structures

C# File Handling

C# Convert.ToInt32()

C# Int32 (int) Struct

C# DateTime Class

C# Uri Class

C# Database Connectivity

C# Windows

C# Other Topics

C# Q & A

C# Programs

C# Find O/P

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.

Syntax:

    bool Uri.IsWellFormedOriginalString();

Parameter(s):

  • 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.

Exception:

    System.InvalidOperationException;

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.");
        else
            Console.WriteLine("uri is not well-formed.");
    }
}

Output

uri is well-formed.
Advertisement
Advertisement


Comments and Discussions!

Load comments ↻


Advertisement
Advertisement
Advertisement

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