System.Globalization.CultureInfo.GetCultureInfo Method

Retrieves a cached, read-only instance of a culture. Parameters specify a culture that is initialized with the System.Globalization.TextInfo and System.Globalization.CompareInfo objects specified by another culture.

Syntax

public static CultureInfo GetCultureInfo (string name, string altName)

Parameters

name
The name of a culture. name is not case-sensitive.
altName
The name of a culture that supplies the System.Globalization.TextInfo and System.Globalization.CompareInfo objects used to initialize name. altName is not case-sensitive.

Returns

A read-only System.Globalization.CultureInfo object.

Remarks

For a list of predefined culture names, see the tp://go.microsoft.com/fwlink/?LinkId=200048 at the Go Global Developer Center.

The erload:System.Globalization.CultureInfo.GetCultureInfo method obtains a cached, read-only System.Globalization.CultureInfo object. It offers better performance than a corresponding call to a erload:System.Globalization.CultureInfo.#ctor constructor. The method is used to create a culture similar to that specified by the name parameter, but with different sorting and casing rules.

If name or altName is the name of the current culture, the returned objects do not reflect any user overrides. If name is string.Empty, the method returns the invariant culture. This is equivalent to retrieving the value of the CultureInfo.InvariantCulture property. If altName is string.Empty, the method uses the writing system and comparison rules specified by the invariant culture.

Requirements

Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0