private static CultureData CreateCultureData(string cultureName, bool useUserOverride) { CultureData culture = new CultureData(); culture.bUseOverrides = useUserOverride; culture.sRealName = cultureName; // Ask native code if that one's real if (culture.InitCultureData() == false) { #if !FEATURE_CORECLR if (culture.InitCompatibilityCultureData() == false && culture.InitLegacyAlternateSortData() == false) #endif { return null; } } return culture; }
private static CultureData CreateCultureData(string cultureName, bool useUserOverride) { CultureData data = new CultureData { bUseOverrides = useUserOverride, sRealName = cultureName }; if ((!data.InitCultureData() && !data.InitCompatibilityCultureData()) && !data.InitLegacyAlternateSortData()) { return null; } return data; }