Why when I float.Parse a string “109.7” and insert the result into the DB to a ‘float’ column I get 109.69999694824219 instead of 109.7?
I am using Microsoft SQL Server 2008 and C#. The string of the number is taken from a Text input field.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
floats do not have full precision. You should use decimal.Parse instead.