Version

Parse(String,TimeSpanFormatInfo) Method

Parses the specified string into a TimeSpan, using the specified display strings, or TimeSpan.MinValue if the specified string could not be parsed.
Syntax
'Declaration
 
Public Overloads Shared Function Parse( _
   ByVal value As String, _
   ByVal formatInfo As TimeSpanFormatInfo _
) As TimeSpan
public static TimeSpan Parse( 
   string value,
   TimeSpanFormatInfo formatInfo
)

Parameters

value
The TimeSpan value to be parsed.
formatInfo
A TimeSpanFormatInfo instance used to provide formatting information.

Return Value

A TimeSpan structure, or TimeSpan.MinValue if the parsing operation failed.
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