views:

9

answers:

1

I'm exporting data to a csv file using Asp.net and I need to know from the System.Globalization.CultureInfo.CurrentCulture if I should use "," or ";" as a value separator. For example US needs "," and Europe needs ";". How can I find out which one to use from the CurrentCulture?

Thanks!

+2  A: 
System.Globalization.CultureInfo.CurrentCulture.TextInfo.ListSeparator

Definition from the msdn docs:

Gets or sets the string that separates items in a list.

geoff
Perfect! Thanks!
Martin
@Martin - No problem :)
geoff