Hi all,
2 points:
1. I'm looking for a calculation that would show the advantages of using the decimal primitive in C#, ie a calculation that would yield different results when using floats and decimals.
I Java such calculations would be repeatedly dividing 9 by 10, or 0.70 * 1.05. With C#, these give correct results even with floats and doubles.
2. What is the point of the Decimal class? does it offer any advantages over the decimal primitive, or is it just a wrapper class?
Cheers,
Robin
2 points:
1. I'm looking for a calculation that would show the advantages of using the decimal primitive in C#, ie a calculation that would yield different results when using floats and decimals.
I Java such calculations would be repeatedly dividing 9 by 10, or 0.70 * 1.05. With C#, these give correct results even with floats and doubles.
2. What is the point of the Decimal class? does it offer any advantages over the decimal primitive, or is it just a wrapper class?
Cheers,
Robin