In Control Panel-> Regional and language options-> Regional Options-> Standard and formats, there is the list of all the regionals and by clicking the "Customize" button, the us开发者_C百科er can set the time format
My question is how to get the current and default time format for all the regionals programmelly?
You can list them through C# like this.
foreach(var cultureInfo in CultureInfo.GetCultures(CultureTypes.AllCultures))
{
Console.WriteLine("{0}: {1}",
cultureInfo.Name,
cultureInfo.IsNeutralCulture ? "-" : cultureInfo.DateTimeFormat.ShortDatePattern);
}
精彩评论