Export (0) Print
Expand All

CultureInfo.GetCultureInfo Method (Int32)

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

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

public static CultureInfo GetCultureInfo (
	int culture
)
public static CultureInfo GetCultureInfo (
	int culture
)
public static function GetCultureInfo (
	culture : int
) : CultureInfo
Not applicable.

Parameters

culture

A culture identifier.

Return Value

A read-only CultureInfo object.

Exception typeCondition

ArgumentOutOfRangeException

culture is less than zero.

ArgumentException

culture specifies a culture that is not supported.

The GetCultureInfo method obtains a cached, read-only culture object more quickly than a new culture object is created with a CultureInfo constructor. Your application should clear the cache with the ClearCachedData method.

The GetCultureInfo method is typically used by tools that need to efficiently load resources or create multiple instances of a culture.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

.NET Compact Framework

Supported in: 2.0

XNA Framework

Supported in: 1.0

Community Additions

ADD
Show:
© 2014 Microsoft