DateWithZone.TryParse MethodDateWithZone.TryParse MethodDateWithZone::TryParse Method
Converts a lexical representation of an
xs:date
to its DateWithZoneDateWithZoneDateWithZone equivalent.
A return value indicates whether the conversion succeeded or failed.
Syntax
Public Shared Function TryParse( _ value As String, _ <Out>result As ByRef DateWithZone _ ) As Boolean
public static bool TryParse( string value, out DateWithZone result )
public: static bool TryParse( String^ value, [Out] DateWithZone% result )
Parameters
- value
Type: System.StringSystem.StringSystem::String^
The lexical representation of an
xs:date
to convert.- result
Type: out XmlPrime.DateWithZoneByRef XmlPrime.DateWithZoneXmlPrime::DateWithZone%
When this method returns, contains the DateWithZoneDateWithZoneDateWithZone value equivalent to the
xs:date
represented by value if the conversion succeeded, or the epoch (0001-01-01Z
) if the conversion failed.
Return Value
Type: System.BooleanSystem.BooleanSystem::Boolean
valuevaluevalue if the conversion succeeded; otherwise false
False
false
.
Exceptions
Exception | Condition |
ArgumentNullExceptionArgumentNullExceptionArgumentNullException | value is null
a null reference (Nothing in Visual Basic)
nullptr . |