Duration.Parse MethodDuration.Parse MethodDuration::Parse Method

Converts a lexical representation of an xs:duration to its DurationDurationDuration equivalent.

Syntax

Public Shared Function Parse( _
    value As String _
) As Duration
public static Duration Parse(
    string value
)
public:
static Duration Parse(
    String^ value
)
 

Parameters

value

Type: System.StringSystem.StringSystem::String^

The lexical representation of an xs:duration to convert.

Return Value

Type: XmlPrime.DurationXmlPrime.DurationXmlPrime::Duration

The DurationDurationDuration equivalent to the xs:duration represented by value.

Exceptions

ExceptionCondition
ArgumentNullExceptionArgumentNullExceptionArgumentNullExceptionvalue is null a null reference (Nothing in Visual Basic) nullptr.
FormatExceptionFormatExceptionFormatException value is not a valid lexical value of an xs:duration.
OverflowExceptionOverflowExceptionOverflowException value represents a duration less than MinValueMinValueMinValue or greater than MaxValueMaxValueMaxValue.