Last active
January 29, 2020 23:14
-
-
Save ah01/f6e2586290d78a722fdbe7fc3c836565 to your computer and use it in GitHub Desktop.
List Separators in Different Cultures (separator for CSV in Excel)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Globalization; | |
namespace ConsoleApp | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var cultures = CultureInfo.GetCultures(CultureTypes.AllCultures); | |
foreach (var c in cultures) | |
{ | |
var same = c.Parent == CultureInfo.InvariantCulture ? "" : (c.Parent.TextInfo.ListSeparator == c.TextInfo.ListSeparator ? "Yes" : "No"); | |
System.Console.WriteLine($"{c.Name}\t{c.TwoLetterISOLanguageName}\t{c.EnglishName}\t{c.TextInfo.ListSeparator}\t{same}\n"); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment