Click or drag to resize
DoubleParse Method (String, NumberStyles, IFormatProvider)
Converts the string representation of a number in a specified style and culture-specific format to its double-precision floating-point number equivalent.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static double Parse(
	string s,
	NumberStyles style,
	IFormatProvider provider
)

Parameters

s
Type: SystemString
A string that contains a number to convert.
style
Type: System.GlobalizationNumberStyles
A bitwise combination of enumeration values that indicate the style elements that can be present in s. A typical value to specify is Float combined with AllowThousands.
provider
Type: SystemIFormatProvider
An object that supplies culture-specific formatting information about s.

Return Value

Type: Double
A double-precision floating-point number that is equivalent to the numeric value or symbol specified in s.
Exceptions
ExceptionCondition
ArgumentNullExceptions is null.
FormatExceptions does not represent a numeric value.
ArgumentExceptionstyle is not a NumberStyles value. -or-style is the AllowHexSpecifier value.
OverflowExceptions represents a number that is less than MinValue or greater than MaxValue.
See Also