Windows apps
Collapse the table of content
Expand the table of content

CultureInfo Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Provides information about a specific culture (called a locale for unmanaged code development). The information includes the names for the culture, the writing system, the calendar used, and formatting for dates and sort strings.

System..::..Object
  System.Globalization..::..CultureInfo

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

'Declaration
Public Class CultureInfo

The CultureInfo type exposes the following members.

  NameDescription
Public methodCultureInfoInitializes a new instance of the CultureInfo class based on the culture specified by name.
Top

  NameDescription
Public propertyStatic memberCurrentUICultureGets the CultureInfo object that represents the current user interface culture used by the Resource Manager to look up culture-specific resources at run time.
Public propertyDateTimeFormatGets or sets a DateTimeFormatInfo that defines the culturally appropriate format of displaying dates and times.
Public propertyNameGets the culture name in the format languagecode2-country/regioncode2.
Public propertyNumberFormatGets or sets a NumberFormatInfo that defines the culturally appropriate format of displaying numbers, currency, and percentage.
Public propertyParentGets the CultureInfo that represents the parent culture of the current CultureInfo.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodStatic memberGetCulturesGets the list of supported cultures filtered by the specified CultureTypes parameter.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string containing the name of the current CultureInfo in the format languagecode2-country/regioncode2. (Overrides Object..::..ToString()()()().)
Top

The CultureInfo class provides culture-specific information, such as the language, sublanguage, country/region, calendar, and conventions associated with a particular culture. The CultureInfo class is used either directly or indirectly by classes that format, parse, or manipulate culture-specific data, such as String, DateTime, DateTimeOffset, and the numeric types.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2017 Microsoft