Uri.IsWellFormedUriString Method
Assembly: System (in system.dll)
public static boolean IsWellFormedUriString ( String uriString, UriKind uriKind )
public static function IsWellFormedUriString ( uriString : String, uriKind : UriKind ) : boolean
Not applicable.
Parameters
- uriString
A URI.
- uriKind
The type of the URI in uriString.
Return Value
A Boolean value that is true if the string was well-formed in accordance with RFC 2396 and RFC 2732; else false.The string is considered poorly formed, causing the method to return false, if any of the following conditions occur
| Error | Example |
|---|---|
| The string is not correctly escaped. | |
| The string is an absolute Uri that represents an implicit file Uri. | c:\\directory\filename |
| The string is an absolute URI that is missing a slash before the path. | file://c:/directory/filename |
| The string contains unescaped backslashes even if they will be treated as forward slashes | http:\\host/path/file |
| The string represents a hierarchical absolute Uri and does not contain "://" | www.contoso.com/path/file |
| The parser for the Scheme indicates that the original string was not well-formed. | The example depends on the scheme of the URI. |
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.