×

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.CheckSchemeName() Method with Example

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

Uri.CheckSchemeName() Method

Uri.CheckSchemeName() method is a static method that returns a boolean value, if the specified scheme is valid then it returns true otherwise it returns false.

Syntax:

    bool Uri.CheckSchemeName(string SchemeName);

Parameter(s):

  • string SchemeName – represents the specified SchemeName to be checked, it is valid or not.

Return value:

The return type of this method is Boolean, it returns a boolean value, if the specified scheme is valid then it returns true otherwise it returns false.

Example to demonstrate example of Uri.CheckSchemeName() method

using System;

class UriExample
{
    //Entry point of Program
    static public void Main()
    {
        bool isValid = false;

        Uri domainUri1;
        
        domainUri1 = new Uri("https://www.includehelp.com/index.html");
        
        isValid=Uri.CheckSchemeName(domainUri1.Scheme);
        if (isValid == true)
            Console.WriteLine("Valid Scheme");
        else
            Console.WriteLine("Invalid Scheme");
    }
}

Output

Valid Scheme
Advertisement
Advertisement


Comments and Discussions!

Load comments ↻


Advertisement
Advertisement
Advertisement

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