NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

TimeSpan.FromString

Constructs a TimeSpan from a string.

[Visual Basic]
Public Shared Function FromString( _
   ByVal s As String _
) As TimeSpan
[C#]
public static TimeSpan FromString(
   string s
);
[C++]
public: static TimeSpan FromString(
   String* s
);
[JScript]
public static function FromString(
   s : String
) : TimeSpan;

Parameters

s
The string to parse.

Return Value

A TimeSpan corresponding to the specified string.

Exceptions

Exception Type Condition
ArgumentException If the string is a null reference (in Visual Basic Nothing).
FormatException If the string cannot be parsed.

Remarks

Leading and trailing white space characters are allowed.

See Also

TimeSpan Structure | TimeSpan Members | System Namespace | String | ToString