Table of Contents

Class CultureInfo

Namespace
System.Globalization
Assembly
mscorlib.dll

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, the sort order of strings, and formatting for dates and numbers.

public class CultureInfo
Inheritance
CultureInfo
Inherited Members
Extension Methods

Constructors

CultureInfo(string)

Initializes a new instance of the CultureInfo class based on the culture specified by name.

public CultureInfo(string name)

Parameters

name string

A predefined CultureInfo name, Name of an existing CultureInfo, or Windows-only culture name. Name is not case-sensitive.

Properties

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 static CultureInfo CurrentUICulture { get; }

Property Value

CultureInfo

The culture used by the Resource Manager to look up culture-specific resources at run time.

DateTimeFormat

Gets a DateTimeFormatInfo that defines the culturally appropriate format of displaying dates and times.

public virtual DateTimeFormatInfo DateTimeFormat { get; }

Property Value

DateTimeFormatInfo

A DateTimeFormatInfo that defines the culturally appropriate format of displaying dates and times.

Name

Gets the culture name in the format languagecode2-country/regioncode2.

public virtual string Name { get; }

Property Value

string

The culture name in the format languagecode2-country/regioncode2. languagecode2 is a lowercase two-letter code derived from ISO 639-1. country/regioncode2 is derived from ISO 3166 and usually consists of two uppercase letters, or a BCP-47 language tag.

NumberFormat

Gets a NumberFormatInfo that defines the culturally appropriate format of displaying numbers, currency, and percentage.

public virtual NumberFormatInfo NumberFormat { get; }

Property Value

NumberFormatInfo

A NumberFormatInfo that defines the culturally appropriate format of displaying numbers, currency, and percentage.

Parent

Gets the CultureInfo that represents the parent culture of the current CultureInfo.

public virtual CultureInfo Parent { get; }

Property Value

CultureInfo

The CultureInfo that represents the parent culture of the current CultureInfo.

Methods

ToString()

Returns a string containing the name of the current CultureInfo in the format languagecode2-country/regioncode2.

public override string ToString()

Returns

string

A string containing the name of the current CultureInfo.