Skip to content

Decimal Value Type

Overview

The Decimal value type is appropriate for financial calculations requiring large numbers of significant integral and fractional digits and no round-off errors. The Decimal type does not eliminate the need for rounding. Rather, it minimizes errors due to rounding.

For more information refer to the Decimal Structure topic in MSDN.

Definition

A Decimal value type is defined in the following manner:

text
[ws][sign][integral-digits[,]]integral-digits[.[fractional-digits]}|.fractional-digits[ws]
ItemBehaviourDescription
wsOptionalWhite space.
signOptionalMinus sign indicating a negative Decimal value.
integral-digitsRequired if fractional-digits is not presentA series of digits ranging from 0 to 9 that specify the integral part of the number. Runs of integral-digits can be partitioned by a group-separator symbol.
,OptionalA culture-specific thousands separator symbol.
.OptionalA culture-specific decimal point symbol.
fractional-digitsOptionalA series of digits ranging from 0 to 9 that specify the fractional part of the number.

Predefined values

The following is a list of predefined Decimal values:

Default value0
Minimum value-79,228,162,514,264,337,593,543,950,335
Maximum value79,228,162,514,264,337,593,543,950,335

For more information refer to the Decimal.Parse Method topic in MSDN.