IsWellFormedUriString Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Indicates whether the string is well-formed by attempting to construct a URI with the string and ensures that the string does not require further escaping.

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

public static bool IsWellFormedUriString(
	string uriString,
	UriKind uriKind
)

Parameters

uriString
Type: System..::..String
The string used to attempt to construct a Uri.
uriKind
Type: System..::..UriKind
The type of the Uri in uriString.

Return Value

Type: System..::..Boolean
A Boolean value that is true if the string was well-formed; else false.

By default, the string is considered well-formed in accordance with RFC 2396 and RFC 2732. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, the string is considered well-formed in accordance with RFC 3986 and RFC 3987.

Show: