System.Globalization.CultureInfo.construct_internal_locale_from_name C# (CSharp) Méthode

construct_internal_locale_from_name() private méthode

private construct_internal_locale_from_name ( string name ) : bool
name string
Résultat bool
		private extern bool construct_internal_locale_from_name (string name);

Usage Example

Exemple #1
0
        public static CultureInfo CreateSpecificCulture(string name)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }

            if (name.Length == 0)
            {
                return(InvariantCulture);
            }

            var src_name = name;

            name = name.ToLowerInvariant();
            CultureInfo ci = new CultureInfo();

            if (!ci.construct_internal_locale_from_name(name))
            {
                int idx = name.IndexOf('-');
                if (idx < 1 || !ci.construct_internal_locale_from_name(name.Substring(0, idx)))
                {
                    throw CreateNotFoundException(src_name);
                }
            }

            if (ci.IsNeutralCulture)
            {
                ci = CreateSpecificCultureFromNeutral(ci.Name);
            }

            return(ci);
        }
All Usage Examples Of System.Globalization.CultureInfo::construct_internal_locale_from_name