Hi i have a us number with decimal, which i try to convert to a danish number format. But somehow, i does not convert correctly
CultureInfo us = new CultureInfo("en-US");
CultureInfo dk = new CultureInfo("da-DK");
double data = double.Parse("98.5");
Console.WriteLine(data.ToString("N", dk));
My understanding is that .5 is the decimal i my instance. What i am trying to acheive is to make in into 98,5 instead. But when i try to do the following in my test code, it returns 985,0.
I need it to happen dynamic. A user could have saved the value as a string "98.5", and when he visit the value, it will be displayed correct because it displays in his culture.. But what if a different user, with a different culture visits the value. Then i would not be able to use cultureInfo "us" and "dk"?