Her er nogle guidelines for det:
A double has a range of about 5.0 x 10–324 to 1.7 x 10308, and a precision of 15 to 16 digits. double literals may have the suffix D or d. It, too, may have literals expressed with or without exponential notation:
double vectorMagnitude = 8.2e127;
double accumulatedVolume = 7982365.83658341;
// also 7982365.83658341D
// or 7982365.83658341d
A new type not seen in any other language is the decimal type. The decimal type has 28 or 29 digits of precision and can range from 1.0 x 10–28 to about 7.9 x 1028. decimal literals can be specified with an M or m suffix. The trade-off between decimal and double is precision versus range. The decimal is the best choice when precision is required, but choose a double for the greatest range. The decimal type is well suited for financial calculations, as shown in the following example:
decimal annualSales = 99873582948769876589348317.95;
TIP
Use the C# decimal type for greater precision in financial calculations
taget herfra:
www.informit.com/articles/article.asp%3Fp%3D23211%26seqNum%3D7+c%23+difference+between+double+and+decimal&hl=da&gl=dk&ct=clnk&cd=1&client=firefox-a" target="_blank">http://209.85.135.104/search?q=cache:XBARQR4cnZ4J:
www.informit.com/articles/article.asp%3Fp%3D23211%26seqNum%3D7+c%23+difference+between+double+and+decimal&hl=da&gl=dk&ct=clnk&cd=1&client=firefox-a