System.Uri.CheckSchemeName Method

Determines whether the specified scheme name is valid.

Syntax

public static bool CheckSchemeName (string schemeName)

Parameters

schemeName
The scheme name to validate.

Returns

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

Remarks

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.

Requirements

Namespace: System
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0