When I run the code below, I can create two valid cultures that are not returned in CultureInfo.GetCultures(CultureTypes.AllCultures). Why is this the case and why are those cultures missing? I am running on Windows 10 using .NET 4.6.1
var allCultureNamesHashSet = new HashSet<string>(CultureInfo.GetCultures(CultureTypes.AllCultures).Select(ci => ci.Name));
var ci1 = new CultureInfo("sr-Cyrl-CS");
var ci2 = new CultureInfo("sr-Latn-CS");
var b1 = allCultureNamesHashSet.Contains(ci1.Name); //false
var b2 = allCultureNamesHashSet.Contains(ci2.Name); //false
CodePudding user response:
From Microsoft: