Click or drag to resize
DoubleTryParse Method (String, Double)
Converts the string representation of a number to its double-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static bool TryParse(
	string s,
	out double result
)

Parameters

s
Type: SystemString
A string containing a number to convert.
result
Type: SystemDouble
When this method returns, contains the double-precision floating-point number equivalent to the s parameter, if the conversion succeeded, or zero if the conversion failed. The conversion fails if the s parameter is null, is not a number in a valid format, or represents a number less than MinValue or greater than MaxValue. This parameter is passed uninitialized.

Return Value

Type: Boolean
true if s was converted successfully; otherwise, false.
See Also