Converts a string to a time-of-day value.
[Visual Basic] Public Shared Function ToTime( _ ByVal value As String _ ) As TimeSpan [C#] public static TimeSpan ToTime( string value ); [C++] public: static TimeSpan ToTime( String* value ); [JScript] public static function ToTime( value : String ) : TimeSpan;
The time-of-day value represented by the string.
Exception Type | Condition |
---|---|
XmlException | If value is null or a reference to a string that does not contain a valid time-of-day value. |
The value parameter must be a non-null reference to a string that contains a well-formed time-of-day value. The string must be of the form hh:mm:ss.sssssss, where hh is the hour (00-23), mm is the minute (00-59), and ss.sssssss is the second (00-59), optionally followed by a decimal point and a fractional part.
XmlString Class | XmlString Members | System.Xml Namespace | FromTime