Constructs a TimeSpan from a string.
[Visual Basic] Public Shared Function Parse( _ ByVal s As String _ ) As TimeSpan [C#] public static TimeSpan Parse( string s ); [C++] public: static TimeSpan Parse( String* s ); [JScript] public static function Parse( s : String ) : TimeSpan;
A TimeSpan that corresponds to s.
Exception Type | Condition |
---|---|
ArgumentException | If the string is a null reference (in Visual Basic Nothing). |
FormatException | If the staring cannot be parsed. |
Leading and trailing white space characters are allowed.
TimeSpan Structure | TimeSpan Members | System Namespace | String