AnyUri.TryCreate Method (string, out AnyUri)AnyUri.TryCreate Method (String, ByRef AnyUri)AnyUri::TryCreate Method (String^, AnyUri^%)

Creates a new AnyUriAnyUriAnyUri from its lexical value. A return value indicates whether the conversion succeeded or failed.

Syntax

Public Shared Function TryCreate( _
    uriString As String, _
    <Out>result As ByRef AnyUri _
) As Boolean
public static bool TryCreate(
    string uriString,
    out AnyUri result
)
public:
static bool TryCreate(
    String^ uriString, 
    [Out] AnyUri^% result
)
 

Parameters

uriString

Type: System.StringSystem.StringSystem::String^

The lexical representation of the URI.

result

Type: out XmlPrime.AnyUriByRef XmlPrime.AnyUriXmlPrime::AnyUri^%

When this method returns, contains a AnyUriAnyUriAnyUri constructed from uriString, or null a null reference (Nothing in Visual Basic) nullptr if creation failed.

Return Value

Type: System.BooleanSystem.BooleanSystem::Boolean

trueTruetrue if the AnyUriAnyUriAnyUri was successfully created; otherwise falseFalsefalse.

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullExceptionuriString is null a null reference (Nothing in Visual Basic) nullptr

Remarks

If uriString is not a valid URI, then the string is percent encoded and another attempt is made to parse it.