public static CultureInfo[] GetCultures(CultureTypes types)
{
bool neutral=((types & CultureTypes.NeutralCultures)!=0);
bool specific=((types & CultureTypes.SpecificCultures)!=0);
bool installed=((types & CultureTypes.InstalledWin32Cultures)!=0); // TODO
CultureInfo [] infos = internal_get_cultures (neutral, specific, installed);
// The runtime returns a NULL in the first position of the array when
// 'neutral' is true. We fill it in with a clone of InvariantCulture
// since it must not be read-only
if (neutral && infos.Length > 0 && infos [0] == null) {
infos [0] = (CultureInfo) InvariantCulture.Clone ();
}
return infos;
}