locked
Localization question: how to convert string ("5.0") to float with culture setting as "fr-Fr" RRS feed

  • Question

  • we have a string with initial value sTemperature = "5.0";
    we need to convert it to float = Convert.ToSingle(sTempetature, culture);

    If culture is English"en-US", there is no problem.
    However, if we change the culture to Franch "fr-Fr", it will complaint that "Input string was not in a correct format".
    since the France may use "," as the Decimal symbol and not the "."
    Does anyone know how to solve this problem?
    thx
    Tuesday, April 14, 2009 10:33 PM

Answers