Q:

Conversion of C# decimal values of System. Array in into string

I have a very strange problem in C# application.  The problem is consistent, but only on one remote computer.  The data below contains decimal numbers.  I perform the following simplified operation:
Array data = (Array)get_data(); // array of decimals
StringBuilder sb = new StringBuilder();
sb. Append(data. GetValue(0));
string s = sb. ToString();

This converts numbers like 14.62 into "14,62", i.e comma instead of dot.  Later, when I parse this string into double, it generates errors.  How to prevent this?  
Please note, that I don't have access to that remote computer.  I can only adjust the program's code, and then send a new installer.  

A:

StringBuilder sb = new StringBuilder();

sb. Append(((double)data. GetValue(0)).ToString(CultureInfo. InvariantCulture));

See: http://msdn.microsoft.com/en-us/library/shxtf045(v=vs.110).aspx

