Search code examples
.netcsvculture

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


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.


Solution

  • System.Globalization.CultureInfo.CurrentCulture.TextInfo.ListSeparator

    Is the only way I know how.