Share via


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.

Inheritance Hierarchy

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

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

Syntax

'Declaration
Public Class CultureInfo
public class CultureInfo
public ref class CultureInfo
type CultureInfo =  class end
public class CultureInfo

The CultureInfo type exposes the following members.

Constructors

  Name Description
Public method CultureInfo Initializes a new instance of the CultureInfo class based on the culture specified by name.

Top

Properties

  Name Description
Public propertyStatic member CurrentUICulture Gets 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 property DateTimeFormat Gets or sets a DateTimeFormatInfo that defines the culturally appropriate format of displaying dates and times.
Public property Name Gets the culture name in the format languagecode2-country/regioncode2.
Public property NumberFormat Gets or sets a NumberFormatInfo that defines the culturally appropriate format of displaying numbers, currency, and percentage.
Public property Parent Gets the CultureInfo that represents the parent culture of the current CultureInfo.

Top

Methods

  Name Description
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodStatic member GetCultures Gets the list of supported cultures filtered by the specified CultureTypes parameter.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string containing the name of the current CultureInfo in the format languagecode2-country/regioncode2. (Overrides Object. . :: . .ToString() () () ().)

Top

Remarks

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.

Topic Location
How to: Set the Culture and UI Culture for ASP.NET Web Page Globalization Building ASP .NET Web Applications
How to: Retrieve Resource Values Programmatically Building ASP .NET Web Applications
How to: Create Resource Files for ASP.NET Web Sites Building ASP .NET Web Applications
How to: Display Right-to-Left Text Using HTML Tags for Globalization Building ASP .NET Web Applications
How to: Set the Culture and UI Culture for ASP.NET Web Page Globalization Building ASP .NET Web Applications
How to: Retrieve Resource Values Programmatically Building ASP .NET Web Applications
How to: Create Resource Files for ASP.NET Web Sites Building ASP .NET Web Applications
How to: Display Right-to-Left Text Using HTML Tags for Globalization Building ASP .NET Web Applications
How to: Create Resource Files for ASP.NET Web Sites (Visual Studio) Building ASP .NET Web Applications in Visual Studio
How to: Create Resource Files for ASP.NET Web Sites Building ASP .NET Web Applications

Thread Safety

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

See Also

Reference

System.Globalization Namespace