Export (0) Print
Expand All

CultureInfo.GetCultureInfo Method (String)

Note: This method is new in the .NET Framework version 2.0.

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
)
public static CultureInfo GetCultureInfo (
	String name
)
public static function GetCultureInfo (
	name : String
) : CultureInfo

Parameters

name

The name of a culture.

Return Value

A read-only CultureInfo object.

Exception typeCondition

ArgumentNullException

name is a null reference (Nothing in Visual Basic).

ArgumentException

name specifies a culture that is not supported.

The GetCultureInfo method obtains a cached, read-only culture object more quickly than a new culture object can be created with a CultureInfo constructor. 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 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

.NET Compact Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2015 Microsoft