I have a .NET application available in several different language. i basically load and save file (containing doubles) in the System Culture but i would like to force numbers to always be displayed and entered using the US culture format (comma as digit grouping, period as decimal separator). I tried to override the application Culture but it doesn't seem to work.
Is there a way to deal with this?
R – overiding NumberFormat in .net application cultureInfo
cultureinfonetnumber-formatting
Best Answer
CultureInfo.InvariantCulture
exists for the specific purpose of persisting data in a consistent format. More Info on MSDNFor the UI, if you really want all formatting to be US-style, you can do this:
Note that you would need to set the culture on each thread.