I have an application that generates a lengthy Xml output file which contains many many numbers in a non-english format, i.e. thousands delimiter is ‘.’ and decimal delimiter is ‘,’. However, to further process this Xml file, I need all the number values to be in english format (basically, swap the two delimiters). What is the simplest way to achieve this in C#?
I have an application that generates a lengthy Xml output file which contains many
Share
The simplest solution might be to take the number as a string and then parse it using the non-English locale into a double. This should convert the value (for example):
Source