Working with values in C#?

Asked

Viewed 31 times

0

I’m looking for the right way to work with values in C#. In Java I use Bigdecimal but in C# so I did not find anything similar. Some examples I found speak to use double or float or just decimal even.

My question is, for values which ideal to be used ?

  • 1

    I believe it goes according to the limit of this BigDecimal. Float have the accuracy of 7 digits, while the double have accuracy of 15-16 digits if I’m not mistaken. It goes according to what you want to use. But if it’s for storage related to money, the most indicated will be the decimal.

  • @Danielnicodemos thank you.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.