CultureInfoGetCultureInfo Method

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

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

public static CultureInfo GetCultureInfo(
	int culture
static CultureInfo^ GetCultureInfo(
	int culture
static member GetCultureInfo : 
        culture:int -> CultureInfo
Public Shared Function GetCultureInfo (
	culture As Integer
) As CultureInfo



A locale identifier (LCID).

Return Value


A read-only CultureInfo object.

Exception Condition

culture is less than zero.


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

We recommend that you use the string overload of this method ( GetCultureInfo), because locale names should be used instead of LCIDs. For custom locales, the locale name is required.

If culture is the locale identifier of the current culture, the returned CultureInfo object does not reflect any user overrides.

Notes to Callers:

The .NET Framework 3.5 and earlier versions throw an ArgumentException if culture is not a valid culture identifier. 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 culture from the operating system; if the operating system does not support that culture, the method throws a CultureNotFoundException.

.NET Framework
Available since 2.0
Return to top