DateTimeWithZone.TryParse MethodDateTimeWithZone.TryParse MethodDateTimeWithZone::TryParse Method
Converts a lexical representation of an
xs:dateTime to its DateTimeWithZoneDateTimeWithZoneDateTimeWithZone
equivalent. A return value indicates whether the conversion succeeded or failed.
Syntax
Public Shared Function TryParse( _ value As String, _ <Out>result As ByRef DateTimeWithZone _ ) As Boolean
public static bool TryParse( string value, out DateTimeWithZone result )
public: static bool TryParse( String^ value, [Out] DateTimeWithZone% result )
Parameters
- value
Type: System.StringSystem.StringSystem::String^
The string representation of an
xs:dateTimeto convert.- result
Type: out XmlPrime.DateTimeWithZoneByRef XmlPrime.DateTimeWithZoneXmlPrime::DateTimeWithZone%
When this method returns, contains the DateTimeWithZoneDateTimeWithZoneDateTimeWithZone value equivalent to the
xs:dateTimerepresented by value if the conversion succeeded, or the epoch (0001-01-01T00:00:00) if the conversion failed.
Return Value
Type: System.BooleanSystem.BooleanSystem::Boolean
trueTruetrue if the conversion succeeded; otherwise falseFalsefalse.
Exceptions
| Exception | Condition |
| ArgumentNullExceptionArgumentNullExceptionArgumentNullException | value is null
a null reference (Nothing in Visual Basic)
nullptr. |
