Duration.TryParse MethodDuration.TryParse MethodDuration::TryParse Method
Converts a lexical representation of an
xs:duration to its DurationDurationDuration
equivalent. A return value indicates whether the conversion succeeded or failed.
Parameters
- value
Type: System.StringSystem.StringSystem::String^
The lexical representation of an
xs:durationto convert.- result
Type: out XmlPrime.DurationByRef XmlPrime.DurationXmlPrime::Duration%
When this method returns, contains the DurationDurationDuration value equivalent to the
xs:durationrepresented by value if the conversion succeeded, or zero (PT0S) 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. |
