Uri.CheckSchemeName Method (String)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Determines whether the specified scheme name is valid.

Namespace:   System
Assembly:  System (in System.dll)

static member CheckSchemeName : 
        schemeName:string -> bool

Parameters

schemeName
Type: System.String

The scheme name to validate.

Return Value

Type: System.Boolean

A Boolean value that is true if the scheme name is valid; otherwise, false.

This method checks the scheme name for validity according to RFC 2396 by default. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, this method checks the scheme name for validity according to RFC 3986. The scheme name must begin with a letter and must contain only letters, digits, and the characters ".", "+", or "-".

For more information on IRI support, see the Remarks section for the Uri class.

The following example creates a Uri instance and checks whether the scheme name is valid.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: