TryParse()

Double::TryParse(const String&, double&) method

Converts the specified string containing the string representation of a number to the equivalent double-precision floating-point value.

static bool System::Double::TryParse(const String &value, double &result)

Arguments

ParameterTypeDescription
valueconst String&The string to convert.
resultdouble&The reference to a double-precision floating-point variable where the result of the conversion is put.

Return Value

True if the conversion succeeded, otherwise - false.

Double::TryParse(const String&, Globalization::NumberStyles, const SharedPtr<IFormatProvider>&, double&) method

Converts the specified string containing the string representation of a number to the equivalent double-precision floating-point value using the provided formatting information and number style.

static bool System::Double::TryParse(const String &value, Globalization::NumberStyles styles, const SharedPtr<IFormatProvider> &provider, double &result)

Arguments

ParameterTypeDescription
valueconst String&The string to convert.
stylesGlobalization::NumberStylesA bitwise combination of values of NumberStyles enum that specifies the permitted style of the string representation of a number.
providerconst SharedPtr<IFormatProvider>&A pointer to an object that contains the string format information.
resultdouble&The reference to a double-precision floating-point variable where the result of the conversion is put.

Return Value

True if the conversion succeeded, otherwise - false.

Double::TryParse(const String&, Globalization::NumberStyles, const SharedPtr<Globalization::CultureInfo>&, double&) method

static bool System::Double::TryParse(const String &value, Globalization::NumberStyles styles, const SharedPtr<Globalization::CultureInfo> &culture, double &result)

Double::TryParse(const String&, Globalization::NumberStyles, const SharedPtr<Globalization::NumberFormatInfo>&, double&) method

static bool System::Double::TryParse(const String &value, Globalization::NumberStyles styles, const SharedPtr<Globalization::NumberFormatInfo> &nfi, double &result)

Double::TryParse(const String&, Globalization::NumberStyles, std::nullptr_t, double&) method

static bool System::Double::TryParse(const String &value, Globalization::NumberStyles styles, std::nullptr_t, double &result)

See Also