c# adding float numbers behave weirdly [duplicate]
问题 This question already has answers here : Can anyone explain this floating point weirdness to me? (3 answers) Closed 6 years ago . I am trying to add a row's cells and display the total in a new cell in a grid. I am using gridControl from DevExpress. The grid has 12 columns representing the months in a year and I want to add the months values and display the total in the 13th column. My problem is that if I have a float value of "111,22", it is added as "111,2188" to the database and displayed