Parse()

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)

Arguments

ParameterTypeDescription
sconst String&The string representation of a number

Return Value

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

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)

Arguments

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

Return Value

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

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)

Arguments

ParameterTypeDescription
sconst String&The string representation of a decimal value to convert
providerconst SharedPtr<IFormatProvider>&Format provider

Return Value

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

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)

Arguments

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

Return Value

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

See Also