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.
Assembly: System (in System.dll)
'Declaration Public Shared Function IsWellFormedUriString ( _ uriString As String, _ uriKind As UriKind _ ) As Boolean 'Usage Dim uriString As String Dim uriKind As UriKind Dim returnValue As Boolean returnValue = Uri.IsWellFormedUriString(uriString, _ uriKind)
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.
The string is considered poorly formed, causing the method to return false, if any of the following conditions occur
The string is not correctly escaped.
The string is an absolute URI that is missing a slash before the path.
The string contains unescaped backslashes even if they will be treated as forward slashes
The string represents a hierarchical absolute Uri and does not contain "://"
The parser for the Scheme indicates that the original string was not well-formed.
The example depends on the scheme of the URI.
For more information on IRI support, see the Remarks section for the Uri class.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.