Is there a way to change the locale of .Net Core 3.1? Perhaps via dotnet CLI? Right now it's using , for decimals instead of ..
I'm working on a console application using .Net Core 3.1.
Is there a way to change the locale of .Net Core 3.1? Perhaps via dotnet CLI? Right now it's using , for decimals instead of ..
I'm working on a console application using .Net Core 3.1.
at startup of your application:
System.Threading.Thread.CurrentThread.CurrentCulture
= System.Globalization.CultureInfo.GetCultureInfo("en");
or "fr" or "the culture of your choice"
or to go straight to the point (less good to my opinion):
System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencyGroupSeparator="";
System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberGroupSeparator="";
System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencyDecimalSeparator=".";
System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator=".";