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

GetCultureInfo() public static méthode

public static GetCultureInfo ( string name ) : CultureInfo
name string
Résultat CultureInfo
		public static CultureInfo GetCultureInfo (string name)
		{
			if (name == null)
				throw new ArgumentNullException ("name");

			CultureInfo c;
			lock (shared_table_lock){
				if (shared_by_name != null){
					if (shared_by_name.TryGetValue (name, out c))
						return c;
				}
				c = new CultureInfo (name, false, true);
				insert_into_shared_tables (c);
				return c;
			}
		}

Same methods

CultureInfo::GetCultureInfo ( int culture ) : CultureInfo
CultureInfo::GetCultureInfo ( string name, string altName ) : CultureInfo

Usage Example

Exemple #1
0
        // -----------------------------
        // ---- PAL layer ends here ----
        // -----------------------------

        private bool NeedsTurkishCasing(string localeName)
        {
            Contract.Assert(localeName != null);

            return(CultureInfo.GetCultureInfo(localeName).CompareInfo.Compare("\u0131", "I", CompareOptions.IgnoreCase) == 0);
        }