I have a problem. when I parse a string like "0.005" to float or double, it works fine on my computer, but when i install my program to my client's computer, it returns 5. (both my computer and my client's computer are using Windows 7 x64). Here are my examples
public float getFloat()
    {
        float mn = float.Parse("0.005");
        double mn2 = Convert.ToDouble("0.005");
        return mn;
    }
                It could be problem with system culture settings. Try this:
float.Parse("0.005", CultureInfo.InvariantCulture);
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With