NAnt SDK Documentation - v0.92

TimeSpanConversionFunctions.Parse Method 

Constructs a TimeSpan from a time indicated by a specified string.

[Visual Basic]
<Function(Name:="parse")>
Public Shared Function Parse( _
   ByVal s As String _
) As TimeSpan
[C#]
[Function(Name="parse")]
public static TimeSpan Parse(
   string s
);

Parameters

s
A string.

Return Value

A TimeSpan that corresponds to s.

Exceptions

Exception Type Condition
FormatException s has an invalid format.
OverflowException At least one of the hours, minutes, or seconds components is outside its valid range.

See Also

TimeSpanConversionFunctions Class | NAnt.Core.Functions Namespace