Is possible to obtain the CSV separator from Thread.CurrentThread.CurrentCulture? (.NET)

StackOverflow https://stackoverflow.com/questions/413623

  •  03-07-2019
  •  | 
  •  

Question

In languages where the decimal separator is a ,(comma) the CSV (comma separated values file format) separator is a ; (semicolon). I know where to find this configuration in the Windows Control Panel, but I don't know how to find it progamatically in a .NET application.

I guess that Thread.CurrentThread.CurrentCulture has that information, but I couldn't find inside it.

Was it helpful?

Solution

System.Globalization.CultureInfo.CurrentCulture.TextInfo.ListSeparator

Is the only way I know how.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top