0

I'm working on a C# application that I run on raspberry pi with mono.

I would like to convert a double A = 0.05 to a double B = 0,05.

I succesfully did it on my computer, I changed my Number Decimal Separator for this application and it works very well, but once I try it on the Raspberry pi, it do not work.

            //Changing the decimal separator           
            CultureInfo culture;
            culture = (CultureInfo)Application.CurrentCulture.Clone();
            culture.NumberFormat.NumberDecimalSeparator = ".";
            Application.CurrentCulture = culture;

I think that on the raspberry, I can't read the CultureInfo property, I tried to change the langage from fr-FR to en-US but it didn't work...

Have you any idea which could help me ?

3
  • 1
    Welcome. "I succesfully [sic] did it on my computer" -> What operating system is that? Was it actually using mono, or was it MS .NET?
    – goldilocks
    Commented Dec 16, 2019 at 16:03
  • Maybe this post on changing the locale will help: raspberrypi.stackexchange.com/questions/77145/…
    – John Dyer
    Commented Dec 16, 2019 at 20:15
  • It was working on Visual Studio 2019 on a windows 10 computer. And I already tried to change the locale like this, but it didn't worked
    – Macronaute
    Commented Dec 17, 2019 at 7:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.