Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Globalization.​CultureInfo
Assembly: System.Runtime
Inheritance: object → CultureInfo
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.
Properties
public
Calendar
Calendar
Gets the default calendar used by the culture.
public
CompareInfo
CompareInfo
Gets the <see cref="T:System.Globalization.CompareInfo" /> that defines how to compare strings for the culture.
public
CultureTypes
CultureTypes
Gets the culture types that pertain to the current <see cref="T:System.Globalization.CultureInfo" /> object.
public
DateTimeFormatInfo
DateTimeFormat
Gets or sets a <see cref="T:System.Globalization.DateTimeFormatInfo" /> that defines the culturally appropriate format of displaying dates and times.
public
string
DisplayName
Gets the full localized culture name.
public
string
EnglishName
Gets the culture name in the format languagefull [country/regionfull] in English.
public
string
IetfLanguageTag
Deprecated. Gets the RFC 4646 standard identification for a language.
public
bool
IsNeutralCulture
Gets a value indicating whether the current <see cref="T:System.Globalization.CultureInfo" /> represents a neutral culture.
public
bool
IsReadOnly
Gets a value indicating whether the current <see cref="T:System.Globalization.CultureInfo" /> is read-only.
public
int
KeyboardLayoutId
Gets the active input locale identifier.
public
int
LCID
Gets the culture identifier for the current <see cref="T:System.Globalization.CultureInfo" /> .
public
string
Name
Gets the culture name in the format languagecode2-country/regioncode2.
public
string
NativeName
Gets the culture name, consisting of the language, the country/region, and the optional script, that the culture is set to display.
public
NumberFormatInfo
NumberFormat
Gets or sets a <see cref="T:System.Globalization.NumberFormatInfo" /> that defines the culturally appropriate format of displaying numbers, currency, and percentage.
public
Calendar[]
OptionalCalendars
Gets the list of calendars that can be used by the culture.
public
CultureInfo
Parent
Gets the <see cref="T:System.Globalization.CultureInfo" /> that represents the parent culture of the current <see cref="T:System.Globalization.CultureInfo" /> .
public
TextInfo
TextInfo
Gets the <see cref="T:System.Globalization.TextInfo" /> that defines the writing system associated with the culture.
public
string
ThreeLetterISOLanguageName
Gets the ISO 639-2 three-letter code for the language of the current <see cref="T:System.Globalization.CultureInfo" /> .
public
string
ThreeLetterWindowsLanguageName
Gets the three-letter code for the language as defined in the Windows API.
public
string
TwoLetterISOLanguageName
Gets the ISO 639-1 two-letter or ISO 639-3 three-letter code for the language of the current <see cref="T:System.Globalization.CultureInfo" /> .
public
bool
UseUserOverride
Gets a value indicating whether the current <see cref="T:System.Globalization.CultureInfo" /> object uses the user-selected culture settings.
Methods
public
void
ClearCachedData​()
Refreshes cached culture-related information.
public
object
Clone​() Returns A copy of the current <see cref="T:System.Globalization.CultureInfo" /> .
Creates a copy of the current <see cref="T:System.Globalization.CultureInfo" /> .
public
bool
Equals​(object value)
value
The object to compare with the current <see cref="T:System.Globalization.CultureInfo" /> .
Returns <see langword="true" /> if <paramref name="value" /> is the same culture as the current <see cref="T:System.Globalization.CultureInfo" /> ; otherwise, <see langword="false" /> .
Determines whether the specified object is the same culture as the current <see cref="T:System.Globalization.CultureInfo" /> .
public
CultureInfo
GetConsoleFallbackUICulture​() Returns An alternate culture that is used to read and display text on the console.
Gets an alternate user interface culture suitable for console applications when the default graphic user interface culture is unsuitable.
public
object
GetFormat​(Type formatType)
formatType
The <see cref="T:System.Type" /> for which to get a formatting object. This method only supports the <see cref="T:System.Globalization.NumberFormatInfo" /> and <see cref="T:System.Globalization.DateTimeFormatInfo" /> types.
Returns The value of the <see cref="P:System.Globalization.CultureInfo.NumberFormat" /> property, which is a <see cref="T:System.Globalization.NumberFormatInfo" /> containing the default number format information for the current <see cref="T:System.Globalization.CultureInfo" /> , if <paramref name="formatType" /> is the <see cref="T:System.Type" /> object for the <see cref="T:System.Globalization.NumberFormatInfo" /> class.
-or-
The value of the <see cref="P:System.Globalization.CultureInfo.DateTimeFormat" /> property, which is a <see cref="T:System.Globalization.DateTimeFormatInfo" /> containing the default date and time format information for the current <see cref="T:System.Globalization.CultureInfo" /> , if <paramref name="formatType" /> is the <see cref="T:System.Type" /> object for the <see cref="T:System.Globalization.DateTimeFormatInfo" /> class.
-or-
null, if <paramref name="formatType" /> is any other object.
Gets an object that defines how to format the specified type.
public
int
GetHashCode​() Returns A hash code for the current <see cref="T:System.Globalization.CultureInfo" /> .
Serves as a hash function for the current <see cref="T:System.Globalization.CultureInfo" /> , suitable for hashing algorithms and data structures, such as a hash table.
public
string
ToString​() Returns A string containing the name of the current <see cref="T:System.Globalization.CultureInfo" /> .
Returns a string containing the name of the current <see cref="T:System.Globalization.CultureInfo" /> in the format languagecode2-country/regioncode2.
protected
void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public
Type
GetType​()
Inherited from object
Returns The exact runtime type of the current instance.
Gets the <see cref="T:System.Type" /> of the current instance.
protected
object
MemberwiseClone​()
Inherited from object
Returns A shallow copy of the current <see cref="T:System.Object" /> .
Creates a shallow copy of the current <see cref="T:System.Object" /> .