I am converting a string like \"41.00027357629127\", and I am using;
Convert.ToSingle(\"41.00027357629127\");
or
float.Pars
First, it is just a presentation of the float
number you see in the debugger. The real value is approximately exact (as much as it's possible).
Note: Use always CultureInfo information when dealing with floating point numbers versus strings.
float.Parse("41.00027357629127",
System.Globalization.CultureInfo.InvariantCulture);
This is just an example; choose an appropriate culture for your case.
You can double.Parse("41.00027357629127");
Use Convert.ToDouble("41.00027357629127");
Convert.ToDouble documentation
You can use parsing with double instead of float to get more precision value.
Your thread's locale is set to one in which the decimal mark is "," instead of ".".
Try using this:
float.Parse("41.00027357629127", CultureInfo.InvariantCulture.NumberFormat);
Note, however, that a float cannot hold that many digits of precision. You would have to use double or Decimal to do so.
You can use the following:
float asd = (float) Convert.ToDouble("41.00027357629127");