Version

Parse(String) Method

Parses the specified string into a TimeSpan, using the default unit of time display strings.
Syntax
'Declaration
 
Public Overloads Shared Function Parse( _
   ByVal value As String _
) As TimeSpan
public static TimeSpan Parse( 
   string value
)

Parameters

value
The TimeSpan value to be parsed.

Return Value

The resulting TimeSpan structure.A TimeSpan structure, or TimeSpan.MinValue if the parsing operation failed.
Remarks

The display strings used to parse units of time (week, day, hour, minute) are based on the English (United States) culture; to parse with different values, use the overload that allows explicit declaration of these values.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also