The Decimal class is useful in financial calculations because it can represent numbers to a high degree of accuracy (28 significant digits) and with no rounding errors. They are stored as 96-bit signed integers scaled by a variable power of 10. This power specifies the number of digits to the right of the decimal point and ranges from 0 to 28.
Decimal has a set of arithmetic and logical operators, and also a range of methods to let you perform arithmetic, such as Add(), Subtract(), Multiply!) and Divide(), Mod(), Floor(), and Round(). It is recommended that Decimal be used to replace the older VB Currency type.
Was this article helpful?