   String Convert fails [c#]
  Hi,i want to read numbers from strings. The Input String is "3399084.171875".I tryed to convert it with Convert.ToDouble but the result is "3399084171875.0". Any idea why ?Thanks.   
Quote:Original post by vegiHi,i want to read numbers from strings. The Input String is "3399084.171875".I tryed to convert it with Convert.ToDouble but the result is "3399084171875.0". Any idea why ?Thanks.In your country format is "." the decimal separator? because if you call Convert.ToDouble without a specific culture it use the default one of your country. (Probably in your country the "," is the decimal separator)   ;  Thanks. I now replace the "." with a "," before the conversion.   ;  A better option might just be to use the correct culture when doing the string conversion. Of course, that is only if you care about localization.   