Set up dot instead of comma in numeric values Set up dot instead of comma in numeric values xml xml

Set up dot instead of comma in numeric values


Try this:

System.Globalization.CultureInfo customCulture = (System.Globalization.CultureInfo)System.Threading.Thread.CurrentThread.CurrentCulture.Clone();customCulture.NumberFormat.NumberDecimalSeparator = ".";System.Threading.Thread.CurrentThread.CurrentCulture = customCulture;


You can use value.ToString(CultureInfo.InvariantCulture) to convert your numeric values to strings. Or you can globally change the current culture to a culture that uses the dot as the decimal separator:

Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("en-US");


Use Decimal.ToString(..) with System.Globalization.CultureInfo.InvariantCulture like a paramater applied.

or if you want to do it globaly, use

CurrentCulture to set to always Invariant one, by using Applicaton.CurrentCulture property.