CultureInfo.GetCultureInfo Method (Int32)
Retrieves a cached, read-only instance of a culture by using the specified culture identifier.
Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Parameters
- culture
- Type: System.Int32
A locale identifier (LCID).
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | culture is less than zero. |
| CultureNotFoundException | culture specifies a culture that is not supported. |
We recommend that you use the string overload of this method (GetCultureInfo(String)), 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 CallersThe .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.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.