class CultureInfo

in global :: System . Globalization

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 CultureInfo( int culture )

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

  • culture A predefined identifier, property of an existing object, or Windows-only culture identifier.

public CultureInfo( int culture, bool useUserOverride )

Initializes a new instance of the class based on the culture specified by the culture identifier and on the Boolean that specifies whether to use the user-selected culture settings from the system.

  • culture A predefined identifier, property of an existing object, or Windows-only culture identifier.
  • useUserOverride A Boolean that denotes whether to use the user-selected culture settings () or the default culture settings ().

public CultureInfo( string name )

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

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

public CultureInfo( string name, bool useUserOverride )

Initializes a new instance of the class based on the culture specified by name and on the Boolean that specifies whether to use the user-selected culture settings from the system.

  • name A predefined name, of an existing , or Windows-only culture name. is not case-sensitive.
  • useUserOverride A Boolean that denotes whether to use the user-selected culture settings () or the default culture settings ().

public Calendar Calendar { get; }

Gets the default calendar used by the culture.

  • Returns A that represents the default calendar used by the culture.

public CompareInfo CompareInfo { get; }

Gets the that defines how to compare strings for the culture.

  • Returns The that defines how to compare strings for the culture.

public static CultureInfo CreateSpecificCulture( string name )

Creates a that represents the specific culture that is associated with the specified name.

  • name A predefined name or the name of an existing object. is not case-sensitive.
  • Returns A object that represents: The invariant culture, if is an empty string (""). -or- The specific culture associated with , if is a neutral culture. -or- The culture specified by , if is already a specific culture.

public CultureTypes CultureTypes { get; }

Gets the culture types that pertain to the current object.

  • Returns A bitwise combination of one or more values. There is no default value.

public static CultureInfo CurrentCulture { get; set; }

Gets or sets the object that represents the culture used by the current thread.

  • Returns An object that represents the culture used by the current thread.

public static CultureInfo CurrentUICulture { get; set; }

Gets or sets the object that represents the current user interface culture used by the Resource Manager to look up culture-specific resources at run time.

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

public DateTimeFormatInfo DateTimeFormat { get; set; }

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

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

public static CultureInfo DefaultThreadCurrentCulture { get; set; }

Gets or sets the default culture for threads in the current application domain.

  • Returns The default culture for threads in the current application domain, or if the current system culture is the default thread culture in the application domain.

public static CultureInfo DefaultThreadCurrentUICulture { get; set; }

Gets or sets the default UI culture for threads in the current application domain.

  • Returns The default UI culture for threads in the current application domain, or if the current system UI culture is the default thread UI culture in the application domain.

public string DisplayName { get; }

Gets the full localized culture name.

  • Returns The full localized culture name in the format languagefull [country/regionfull], where languagefull is the full name of the language and country/regionfull is the full name of the country/region.

public string EnglishName { get; }

Gets the culture name in the format languagefull [country/regionfull] in English.

  • Returns The culture name in the format languagefull [country/regionfull] in English, where languagefull is the full name of the language and country/regionfull is the full name of the country/region.

public bool Equals( object value )

Determines whether the specified object is the same culture as the current .

  • value The object to compare with the current .
  • Returns if is the same culture as the current ; otherwise, .

public static CultureInfo GetCultureInfo( int culture )

Retrieves a cached, read-only instance of a culture by using the specified culture identifier.

  • culture A locale identifier (LCID).
  • Returns A read-only object.

public static CultureInfo GetCultureInfo( string name )

Retrieves a cached, read-only instance of a culture using the specified culture name.

  • name The name of a culture. is not case-sensitive.
  • Returns A read-only object.

public static CultureInfo GetCultureInfo( string name, string altName )

Retrieves a cached, read-only instance of a culture. Parameters specify a culture that is initialized with the and objects specified by another culture.

  • name The name of a culture. is not case-sensitive.
  • altName The name of a culture that supplies the and objects used to initialize . is not case-sensitive.
  • Returns A read-only object.

public static CultureInfo GetCultureInfoByIetfLanguageTag( string name )

Deprecated. Retrieves a read-only object having linguistic characteristics that are identified by the specified RFC 4646 language tag.

  • name The name of a language as specified by the RFC 4646 standard.
  • Returns A read-only object.

public static CultureInfo[] GetCultures( CultureTypes types )

Gets the list of supported cultures filtered by the specified parameter.

  • types A bitwise combination of the enumeration values that filter the cultures to retrieve.
  • Returns An array that contains the cultures specified by the parameter. The array of cultures is unsorted.

public object GetFormat( Type formatType )

Gets an object that defines how to format the specified type.

  • formatType The for which to get a formatting object. This method only supports the and types.
  • Returns The value of the property, which is a containing the default number format information for the current , if is the object for the class. -or- The value of the property, which is a containing the default date and time format information for the current , if is the object for the class. -or- null, if is any other object.

public string IetfLanguageTag { get; }

Deprecated. Gets the RFC 4646 standard identification for a language.

  • Returns A string that is the RFC 4646 standard identification for a language.

public static CultureInfo InstalledUICulture { get; }

Gets the that represents the culture installed with the operating system.

  • Returns The that represents the culture installed with the operating system.

public static CultureInfo InvariantCulture { get; }

Gets the object that is culture-independent (invariant).

  • Returns The object that is culture-independent (invariant).

public bool IsNeutralCulture { get; }

Gets a value indicating whether the current represents a neutral culture.

  • Returns if the current represents a neutral culture; otherwise, .

public bool IsReadOnly { get; }

Gets a value indicating whether the current is read-only.

  • Returns if the current is read-only; otherwise, . The default is .

public int KeyboardLayoutId { get; }

Gets the active input locale identifier.

  • Returns A 32-bit signed number that specifies an input locale identifier.

public int LCID { get; }

Gets the culture identifier for the current .

  • Returns The culture identifier for the current .

public string Name { get; }

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

  • Returns 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.

public string NativeName { get; }

Gets the culture name, consisting of the language, the country/region, and the optional script, that the culture is set to display.

  • Returns The culture name. consisting of the full name of the language, the full name of the country/region, and the optional script. The format is discussed in the description of the class.

public NumberFormatInfo NumberFormat { get; set; }

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

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

public Calendar[] OptionalCalendars { get; }

Gets the list of calendars that can be used by the culture.

  • Returns An array of type that represents the calendars that can be used by the culture represented by the current .

public CultureInfo Parent { get; }

Gets the that represents the parent culture of the current .

  • Returns The that represents the parent culture of the current .

public static CultureInfo ReadOnly( CultureInfo ci )

Returns a read-only wrapper around the specified object.

  • ci The object to wrap.
  • Returns A read-only wrapper around .

public TextInfo TextInfo { get; }

Gets the that defines the writing system associated with the culture.

  • Returns The that defines the writing system associated with the culture.

public string ThreeLetterISOLanguageName { get; }

Gets the ISO 639-2 three-letter code for the language of the current .

  • Returns The ISO 639-2 three-letter code for the language of the current .

public string ThreeLetterWindowsLanguageName { get; }

Gets the three-letter code for the language as defined in the Windows API.

  • Returns The three-letter code for the language as defined in the Windows API.

public string TwoLetterISOLanguageName { get; }

Gets the ISO 639-1 two-letter code for the language of the current .

  • Returns The ISO 639-1 two-letter code for the language of the current .

public bool UseUserOverride { get; }

Gets a value indicating whether the current object uses the user-selected culture settings.

  • Returns if the current uses the user-selected culture settings; otherwise, .

public object Clone( )

😔 No documentation found.

public void ClearCachedData( )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public static CultureInfo GetCultureInfo( string name, bool predefinedOnly )

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public CultureInfo GetConsoleFallbackUICulture( )

😔 No documentation found.

public string ToString( )

😔 No documentation found.