Robert is working on financial software and needs to store very precise values for currency calculations. Which data type should he consider?

  • decimal
  • double
  • float
  • long double
Robert should consider using the decimal data type in C#. Unlike float and double, which are floating-point types and have limited precision, decimal provides high precision and is suitable for financial calculations where accuracy is crucial. It can represent numbers with up to 28-29 significant digits, making it ideal for handling currency values.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *