[This is preliminary documentation and is subject to change.]

Constructs a new TimeSpanFormattable object from a time interval specified in a string. Parameters specify the time interval and the variable where the new TimeSpanFormattable object is returned.

Namespace: Tools
Assembly: Tools (in Tools.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
public static bool TryParse(
	string s,
	ref TimeSpanFormattable result
)
Visual Basic
Public Shared Function TryParse ( _
	s As String, _
	ByRef result As TimeSpanFormattable _
) As Boolean
Visual C++
public:
static bool TryParse(
	String^ s, 
	TimeSpanFormattable% result
)
F#
static member TryParse : 
        s:string * 
        result:TimeSpanFormattable byref -> bool 
JScript
public static function TryParse(
	s : String, 
	result : TimeSpanFormattable
) : boolean

Parameters

s
Type: System..::..String
A string that specifies a time interval.
result
Type: Tools..::..TimeSpanFormattable%
When this method returns, contains an object that represents the time interval specified by s, or Zero if the conversion failed. This parameter is passed uninitialized.

Return Value

true if s was converted successfully; otherwise, false. This operation returns false if the s parameter is null, has an invalid format,represents a time interval less than MinValue or greater than MaxValue, or has at least one days, hours, minutes, or seconds component outside its valid range.

See Also