My application generates CSV file from some objects. These CSV files are used in many countries so I must use correct separator.
To seperate values (cells) in a file I use separator:
Dim separator As String = My.Computer.Info.InstalledUICulture.TextInfo.ListSeparator
This should be OK. But one column contains decimal numbers so I want to be sure that I use correct decimal separator (must be different than list separator).
I am converting decimal value to a string like this:
Dim intValue as Integer = 123456
Dim strValue as String = (intValue / 100).ToString()
In my country a list separator is a semicolon and decimal separator is a comma. In this combination it is OK. But I found out that in some country where the list separator is a comma, decimal separator is comma as well. And this is a problem. How I have to convert a decimal number to string if I want to use correct local decimal separator? Thanks!