Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

C# float.parse changing decimal numbers

$
0
0

Hi,

I am using float.parse to convert a number in string to float. Below is the code:

float fAmount = float.Parse("327652.11");

It is returning 327652.13.

This is happening for numbers that are greater than 100000.00. So, some invalid numbers are getting amended at the end.

Can anyone please advice?

Thanks & Regards,


Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>