I am facing problem while converting string to decimal. My C# code is reading the following data from an exel file and throwing me the following error
Input string was not in the correct format "-1.7999999999999999E-2".
I can't see this value in my excel value.
Example data
-1.70152
9.335628333
-150.0145233
39.159625
The c# code
TestModel.lat = Convert.ToDecimal(c.CellValue.Text);
Is my conversion correct. I am loosing out any values during the conversion. Whats the best datataype to convert to inorder to retain the original value as it is?