System::Decimal::Parse method

Decimal::Parse(const String&) method

Converts the string representation of a decimal number into an equivalent instance of Decimal class.

static Decimal System::Decimal::Parse(const String &s)
ParameterTypeDescription
sconst String&The string representation of a number

ReturnValue

A new instance of Decimal class representing a value equivalent to that represented by the specified string.

See Also

Decimal::Parse(const String&, Globalization::NumberStyles) method

Converts the string representation of a decimal number into an equivalent instance of Decimal class using the specified style.

static Decimal System::Decimal::Parse(const String &s, Globalization::NumberStyles styles)
ParameterTypeDescription
sconst String&The string representation of a decimal value to convert
stylesGlobalization::NumberStylesA bitwise combination of the enumeration values that provides additional information about s, about style elements that may be present in s, or about the conversion from s to a Decimal object

ReturnValue

A new instance of Decimal class representing a value equivalent to that represented by the specified string

See Also

Decimal::Parse(const String&, const SharedPtr<IFormatProvider>&) method

Converts the string representation of a decimal number into an equivalent instance of Decimal class using the specified format provider.

static Decimal System::Decimal::Parse(const String &s, const SharedPtr<IFormatProvider> &provider)
ParameterTypeDescription
sconst String&The string representation of a decimal value to convert
providerconst SharedPtr<IFormatProvider>&Format provider

ReturnValue

A new instance of Decimal class representing a value equivalent to that represented by the specified string

See Also

Decimal::Parse(const String&, Globalization::NumberStyles, const SharedPtr<IFormatProvider>&) method

Converts the string representation of a decimal number into an equivalent instance of Decimal class using the specified style and format provider.

static Decimal System::Decimal::Parse(const String &s, Globalization::NumberStyles styles, const SharedPtr<IFormatProvider> &provider)
ParameterTypeDescription
sconst String&The string representation of a decimal value to convert
stylesGlobalization::NumberStylesA bitwise combination of the enumeration values that provides additional information about s, about style elements that may be present in s, or about the conversion from s to a Decimal object
providerconst SharedPtr<IFormatProvider>&Format provider

ReturnValue

A new instance of Decimal class representing a value equivalent to that represented by the specified string

See Also