System.Globalization.CultureInfo.GetCultureInfo Method

Retrieves a cached, read-only instance of a culture using the specified culture name.

Syntax

public static CultureInfo GetCultureInfo (string name)

Parameters

name
The name of a culture. name 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 retrieves a cached, read-only System.Globalization.CultureInfo object. It offers better performance than a corresponding call to the CultureInfo.#ctor(string) constructor.

If name is the name of the current culture, the returned System.Globalization.CultureInfo object does not reflect any user overrides. This makes the method suitable for server applications or tools that do not have a real user account on the system and that need to load multiple cultures efficiently.

If name is string.Empty, the method returns the invariant culture. This is equivalent to retrieving the value of the CultureInfo.InvariantCulture property.

Requirements

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