CultureInfoGetCultureInfo Method

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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

Namespace:   System.Globalization
Assembly:  mscorlib (in mscorlib.dll)

public static CultureInfo GetCultureInfo(
	string name
static CultureInfo^ GetCultureInfo(
	String^ name
static member GetCultureInfo : 
        name:string -> CultureInfo
Public Shared Function GetCultureInfo (
	name As String
) As CultureInfo



The name of a culture. name is not case-sensitive.

Return Value


A read-only CultureInfo object.

Exception Condition

name is null.


name specifies a culture that is not supported. See the Notes to Callers section for more information.

For a list of predefined culture names, see the National Language Support (NLS) API Reference at the Go Global Developer Center. In addition, starting with Windows 10, name can be any valid BCP-47 language tag.

The GetCultureInfo method retrieves a cached, read-only CultureInfo object. It offers better performance than a corresponding call to the CultureInfoCultureInfo constructor.

If name is the name of the current culture, the returned 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 StringEmpty, the method returns the invariant culture. This is equivalent to retrieving the value of the property.

Notes to Callers:

The .NET Framework 3.5 and earlier versions throw an ArgumentException if name is not a valid culture name. Starting with the .NET Framework 4, this method throws a CultureNotFoundException. Starting with apps that run under the .NET Framework 4 or later on Windows 7 or later, the method attempts to retrieve a CultureInfo object whose identifier is name from the operating system; if the operating system does not support that culture, and if name is not the name of a supplementary or replacement culture, the method throws a CultureNotFoundException.

.NET Framework
Available since 2.0
Return to top