Version

Parse(String,TimeSpanFormatInfo,TimeSpanFormat) 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, _
   ByRef format As TimeSpanFormat _
) As TimeSpan
public static TimeSpan Parse( 
   string value,
   TimeSpanFormatInfo formatInfo,
   out TimeSpanFormat format
)

Parameters

value
The TimeSpan value to be parsed.
formatInfo
A TimeSpanFormatInfo instance used to provide formatting information.
format
[out] Upon return, contains the TimeSpanFormat that was specified in the value.

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