Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
under what kinds of situations should I use decimal data type? and I found that most likely I can use double instead, would someone give me some hints for that? Thank you
None of these answers are quite sufficient. Decimals and doubles are apples and oranges. It's not only about precision.
A decimal min and max value is +/- 7.9 x 10^28, but
A double min and max value is +/- 3.4 x 10^308; it can represent +/- infinity (NaN) as well, which makes it a better choice if pure mathematics is involved.