mscorlib(4.0.0.0) API with additions
|
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. More...
Public Member Functions | |
CultureInfo (string name) | |
Initializes a new instance of the T:System.Globalization.CultureInfo class based on the culture specified by name. More... | |
CultureInfo (string name, bool useUserOverride) | |
Initializes a new instance of the T:System.Globalization.CultureInfo 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. More... | |
CultureInfo (int culture) | |
Initializes a new instance of the T:System.Globalization.CultureInfo class based on the culture specified by the culture identifier. More... | |
CultureInfo (int culture, bool useUserOverride) | |
Initializes a new instance of the T:System.Globalization.CultureInfo 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. More... | |
override bool | Equals (object value) |
Determines whether the specified object is the same culture as the current T:System.Globalization.CultureInfo. More... | |
override int | GetHashCode () |
Serves as a hash function for the current T:System.Globalization.CultureInfo, suitable for hashing algorithms and data structures, such as a hash table. More... | |
override string | ToString () |
Returns a string containing the name of the current T:System.Globalization.CultureInfo in the format languagecode2-country/regioncode2. More... | |
virtual object | GetFormat (Type formatType) |
Gets an object that defines how to format the specified type. More... | |
void | ClearCachedData () |
Refreshes cached culture-related information. More... | |
CultureInfo | GetConsoleFallbackUICulture () |
Gets an alternate user interface culture suitable for console applications when the default graphic user interface culture is unsuitable. More... | |
virtual object | Clone () |
Creates a copy of the current T:System.Globalization.CultureInfo. More... | |
Static Public Member Functions | |
static CultureInfo | CreateSpecificCulture (string name) |
Creates a T:System.Globalization.CultureInfo that represents the specific culture that is associated with the specified name. More... | |
static CultureInfo [] | GetCultures (CultureTypes types) |
Gets the list of supported cultures filtered by the specified T:System.Globalization.CultureTypes parameter. More... | |
static CultureInfo | ReadOnly (CultureInfo ci) |
Returns a read-only wrapper around the specified T:System.Globalization.CultureInfo object. More... | |
static CultureInfo | GetCultureInfo (int culture) |
Retrieves a cached, read-only instance of a culture by using the specified culture identifier. More... | |
static CultureInfo | GetCultureInfo (string name) |
Retrieves a cached, read-only instance of a culture using the specified culture name. More... | |
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 T:System.Globalization.TextInfo and T:System.Globalization.CompareInfo objects specified by another culture. More... | |
static CultureInfo | GetCultureInfoByIetfLanguageTag (string name) |
Deprecated. Retrieves a read-only T:System.Globalization.CultureInfo object having linguistic characteristics that are identified by the specified RFC 4646 language tag. More... | |
Public Attributes | |
virtual int | LCID => m_cultureData.ILANGUAGE |
Gets the culture identifier for the current T:System.Globalization.CultureInfo. More... | |
bool | UseUserOverride => m_cultureData.UseUserOverride |
Gets a value indicating whether the current T:System.Globalization.CultureInfo object uses the user-selected culture settings. More... | |
Properties | |
static CultureInfo | CurrentCulture [get, set] |
Gets or sets the T:System.Globalization.CultureInfo object that represents the culture used by the current thread. More... | |
static CultureInfo | CurrentUICulture [get, set] |
Gets or sets the T:System.Globalization.CultureInfo object that represents the current user interface culture used by the Resource Manager to look up culture-specific resources at run time. More... | |
static CultureInfo | InstalledUICulture [get] |
Gets the T:System.Globalization.CultureInfo that represents the culture installed with the operating system. More... | |
static CultureInfo | DefaultThreadCurrentCulture [get, set] |
Gets or sets the default culture for threads in the current application domain. More... | |
static CultureInfo | DefaultThreadCurrentUICulture [get, set] |
Gets or sets the default UI culture for threads in the current application domain. More... | |
static CultureInfo | InvariantCulture [get] |
Gets the T:System.Globalization.CultureInfo object that is culture-independent (invariant). More... | |
virtual CultureInfo | Parent [get] |
Gets the T:System.Globalization.CultureInfo that represents the parent culture of the current T:System.Globalization.CultureInfo. More... | |
virtual int | KeyboardLayoutId [get] |
Gets the active input locale identifier. More... | |
virtual string | Name [get] |
Gets the culture name in the format languagecode2-country/regioncode2. More... | |
string | IetfLanguageTag [get] |
Deprecated. Gets the RFC 4646 standard identification for a language. More... | |
virtual string | DisplayName [get] |
Gets the full localized culture name. More... | |
virtual 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. More... | |
virtual string | EnglishName [get] |
Gets the culture name in the format languagefull [country/regionfull] in English. More... | |
virtual string | TwoLetterISOLanguageName [get] |
Gets the ISO 639-1 two-letter code for the language of the current T:System.Globalization.CultureInfo. More... | |
virtual string | ThreeLetterISOLanguageName [get] |
Gets the ISO 639-2 three-letter code for the language of the current T:System.Globalization.CultureInfo. More... | |
virtual string | ThreeLetterWindowsLanguageName [get] |
Gets the three-letter code for the language as defined in the Windows API. More... | |
virtual CompareInfo? | CompareInfo [get] |
Gets the T:System.Globalization.CompareInfo that defines how to compare strings for the culture. More... | |
virtual TextInfo | TextInfo [get] |
Gets the T:System.Globalization.TextInfo that defines the writing system associated with the culture. More... | |
virtual bool | IsNeutralCulture [get] |
Gets a value indicating whether the current T:System.Globalization.CultureInfo represents a neutral culture. More... | |
CultureTypes????? | CultureTypes [get] |
Gets the culture types that pertain to the current T:System.Globalization.CultureInfo object. More... | |
virtual NumberFormatInfo | NumberFormat [get, set] |
Gets or sets a T:System.Globalization.NumberFormatInfo that defines the culturally appropriate format of displaying numbers, currency, and percentage. More... | |
virtual DateTimeFormatInfo | DateTimeFormat [get, set] |
Gets or sets a T:System.Globalization.DateTimeFormatInfo that defines the culturally appropriate format of displaying dates and times. More... | |
virtual Calendar | Calendar [get] |
Gets the default calendar used by the culture. More... | |
virtual Calendar [] | OptionalCalendars [get] |
Gets the list of calendars that can be used by the culture. More... | |
bool | IsReadOnly [get] |
Gets a value indicating whether the current T:System.Globalization.CultureInfo is read-only. More... | |
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.
Definition at line 16 of file CultureInfo.cs.
System.Globalization.CultureInfo.CultureInfo | ( | string | name | ) |
Initializes a new instance of the T:System.Globalization.CultureInfo class based on the culture specified by name.
name | A predefined T:System.Globalization.CultureInfo name, P:System.Globalization.CultureInfo.Name of an existing T:System.Globalization.CultureInfo, or Windows-only culture name. name is not case-sensitive. |
T:System.ArgumentNullException | name is null. |
T:System.Globalization.CultureNotFoundException | name is not a valid culture name. For more information, see the Notes to Callers section. |
Definition at line 753 of file CultureInfo.cs.
System.Globalization.CultureInfo.CultureInfo | ( | string | name, |
bool | useUserOverride | ||
) |
Initializes a new instance of the T:System.Globalization.CultureInfo 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 T:System.Globalization.CultureInfo name, P:System.Globalization.CultureInfo.Name of an existing T:System.Globalization.CultureInfo, or Windows-only culture name. name is not case-sensitive. |
useUserOverride | A Boolean that denotes whether to use the user-selected culture settings (true ) or the default culture settings (false ). |
T:System.ArgumentNullException | name is null. |
T:System.Globalization.CultureNotFoundException | name is not a valid culture name. See the Notes to Callers section for more information. |
Definition at line 765 of file CultureInfo.cs.
System.Globalization.CultureInfo.CultureInfo | ( | int | culture | ) |
Initializes a new instance of the T:System.Globalization.CultureInfo class based on the culture specified by the culture identifier.
culture | A predefined T:System.Globalization.CultureInfo identifier, P:System.Globalization.CultureInfo.LCID property of an existing T:System.Globalization.CultureInfo object, or Windows-only culture identifier. |
T:System.ArgumentOutOfRangeException | culture is less than zero. |
T:System.Globalization.CultureNotFoundException | culture is not a valid culture identifier. See the Notes to Callers section for more information. |
Definition at line 803 of file CultureInfo.cs.
System.Globalization.CultureInfo.CultureInfo | ( | int | culture, |
bool | useUserOverride | ||
) |
Initializes a new instance of the T:System.Globalization.CultureInfo 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 T:System.Globalization.CultureInfo identifier, P:System.Globalization.CultureInfo.LCID property of an existing T:System.Globalization.CultureInfo object, or Windows-only culture identifier. |
useUserOverride | A Boolean that denotes whether to use the user-selected culture settings (true ) or the default culture settings (false ). |
T:System.ArgumentOutOfRangeException | culture is less than zero. |
T:System.Globalization.CultureNotFoundException | culture is not a valid culture identifier. See the Notes to Callers section for more information. |
Definition at line 815 of file CultureInfo.cs.
void System.Globalization.CultureInfo.ClearCachedData | ( | ) |
Refreshes cached culture-related information.
Definition at line 1086 of file CultureInfo.cs.
|
virtual |
Creates a copy of the current T:System.Globalization.CultureInfo.
Implements System.ICloneable.
Definition at line 1165 of file CultureInfo.cs.
|
static |
Creates a T:System.Globalization.CultureInfo that represents the specific culture that is associated with the specified name.
name | A predefined T:System.Globalization.CultureInfo name or the name of an existing T:System.Globalization.CultureInfo object. name is not case-sensitive. |
T:System.Globalization.CultureNotFoundException | name is not a valid culture name.-or- The culture specified by name does not have a specific culture associated with it. |
T:System.NullReferenceException | name is null. |
Definition at line 953 of file CultureInfo.cs.
override bool System.Globalization.CultureInfo.Equals | ( | object | value | ) |
Determines whether the specified object is the same culture as the current T:System.Globalization.CultureInfo.
value | The object to compare with the current T:System.Globalization.CultureInfo. |
true
if value is the same culture as the current T:System.Globalization.CultureInfo; otherwise, false
.Definition at line 1034 of file CultureInfo.cs.
CultureInfo System.Globalization.CultureInfo.GetConsoleFallbackUICulture | ( | ) |
Gets an alternate user interface culture suitable for console applications when the default graphic user interface culture is unsuitable.
Definition at line 1150 of file CultureInfo.cs.
|
static |
Retrieves a cached, read-only instance of a culture by using the specified culture identifier.
culture | A locale identifier (LCID). |
T:System.ArgumentOutOfRangeException | culture is less than zero. |
T:System.Globalization.CultureNotFoundException | culture specifies a culture that is not supported. See the Notes to Caller section for more information. |
Definition at line 1350 of file CultureInfo.cs.
|
static |
Retrieves a cached, read-only instance of a culture using the specified culture name.
name | The name of a culture. name is not case-sensitive. |
T:System.ArgumentNullException | name is null. |
T:System.Globalization.CultureNotFoundException | name specifies a culture that is not supported. See the Notes to Callers section for more information. |
Definition at line 1371 of file CultureInfo.cs.
|
static |
Retrieves a cached, read-only instance of a culture. Parameters specify a culture that is initialized with the T:System.Globalization.TextInfo and T:System.Globalization.CompareInfo objects specified by another culture.
name | The name of a culture. name is not case-sensitive. |
altName | The name of a culture that supplies the T:System.Globalization.TextInfo and T:System.Globalization.CompareInfo objects used to initialize name . altName is not case-sensitive. |
T:System.ArgumentNullException | name or altName is null. |
T:System.Globalization.CultureNotFoundException | name or altName specifies a culture that is not supported. See the Notes to Callers section for more information. |
Definition at line 1393 of file CultureInfo.cs.
|
static |
Deprecated. Retrieves a read-only T:System.Globalization.CultureInfo 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. |
T:System.ArgumentNullException | name is null. |
T:System.Globalization.CultureNotFoundException | name does not correspond to a supported culture. |
Definition at line 1418 of file CultureInfo.cs.
|
static |
Gets the list of supported cultures filtered by the specified T:System.Globalization.CultureTypes parameter.
types | A bitwise combination of the enumeration values that filter the cultures to retrieve. |
T:System.ArgumentOutOfRangeException | types specifies an invalid combination of T:System.Globalization.CultureTypes values. |
Definition at line 1020 of file CultureInfo.cs.
|
virtual |
Gets an object that defines how to format the specified type.
formatType | The T:System.Type for which to get a formatting object. This method only supports the T:System.Globalization.NumberFormatInfo and T:System.Globalization.DateTimeFormatInfo types. |
Implements System.IFormatProvider.
Definition at line 1072 of file CultureInfo.cs.
override int System.Globalization.CultureInfo.GetHashCode | ( | ) |
Serves as a hash function for the current T:System.Globalization.CultureInfo, suitable for hashing algorithms and data structures, such as a hash table.
Definition at line 1055 of file CultureInfo.cs.
|
static |
Returns a read-only wrapper around the specified T:System.Globalization.CultureInfo object.
ci | The T:System.Globalization.CultureInfo object to wrap. |
T:System.ArgumentNullException | ci is null. |
Definition at line 1202 of file CultureInfo.cs.
override string System.Globalization.CultureInfo.ToString | ( | ) |
Returns a string containing the name of the current T:System.Globalization.CultureInfo in the format languagecode2-country/regioncode2.
Definition at line 1063 of file CultureInfo.cs.
virtual int System.Globalization.CultureInfo.LCID => m_cultureData.ILANGUAGE |
Gets the culture identifier for the current T:System.Globalization.CultureInfo.
Definition at line 304 of file CultureInfo.cs.
bool System.Globalization.CultureInfo.UseUserOverride => m_cultureData.UseUserOverride |
Gets a value indicating whether the current T:System.Globalization.CultureInfo object uses the user-selected culture settings.
true
if the current T:System.Globalization.CultureInfo uses the user-selected culture settings; otherwise, false
.Definition at line 628 of file CultureInfo.cs.
|
get |
Gets the default calendar used by the culture.
Definition at line 592 of file CultureInfo.cs.
|
get |
Gets the T:System.Globalization.CompareInfo that defines how to compare strings for the culture.
Definition at line 447 of file CultureInfo.cs.
|
get |
Gets the culture types that pertain to the current T:System.Globalization.CultureInfo object.
Definition at line 515 of file CultureInfo.cs.
|
staticgetset |
Gets or sets the T:System.Globalization.CultureInfo object that represents the culture used by the current thread.
T:System.ArgumentNullException | The property is set to null . |
Definition at line 120 of file CultureInfo.cs.
|
staticgetset |
Gets or sets the T:System.Globalization.CultureInfo object that represents the current user interface culture used by the Resource Manager to look up culture-specific resources at run time.
T:System.ArgumentNullException | The property is set to null . |
T:System.ArgumentException | The property is set to a culture name that cannot be used to locate a resource file. Resource filenames can include only letters, numbers, hyphens, or underscores. |
Definition at line 174 of file CultureInfo.cs.
|
getset |
Gets or sets a T:System.Globalization.DateTimeFormatInfo that defines the culturally appropriate format of displaying dates and times.
T:System.ArgumentNullException | The property is set to null. |
T:System.InvalidOperationException | The P:System.Globalization.CultureInfo.DateTimeFormat property or any of the T:System.Globalization.DateTimeFormatInfo properties is set, and the T:System.Globalization.CultureInfo is read-only. |
Definition at line 563 of file CultureInfo.cs.
|
staticgetset |
Gets or sets the default culture for threads in the current application domain.
null
if the current system culture is the default thread culture in the application domain.Definition at line 220 of file CultureInfo.cs.
|
staticgetset |
Gets or sets the default UI culture for threads in the current application domain.
null
if the current system UI culture is the default thread UI culture in the application domain.T:System.ArgumentException | In a set operation, the P:System.Globalization.CultureInfo.Name property value is invalid. |
Definition at line 240 of file CultureInfo.cs.
|
get |
Gets the full localized culture name.
Definition at line 373 of file CultureInfo.cs.
|
get |
Gets the culture name in the format languagefull [country/regionfull] in English.
Definition at line 399 of file CultureInfo.cs.
|
get |
Deprecated. Gets the RFC 4646 standard identification for a language.
Definition at line 353 of file CultureInfo.cs.
|
staticget |
Gets the T:System.Globalization.CultureInfo that represents the culture installed with the operating system.
Definition at line 197 of file CultureInfo.cs.
|
staticget |
Gets the T:System.Globalization.CultureInfo object that is culture-independent (invariant).
Definition at line 263 of file CultureInfo.cs.
|
get |
Gets a value indicating whether the current T:System.Globalization.CultureInfo represents a neutral culture.
true
if the current T:System.Globalization.CultureInfo represents a neutral culture; otherwise, false
.Definition at line 503 of file CultureInfo.cs.
|
get |
Gets a value indicating whether the current T:System.Globalization.CultureInfo is read-only.
true
if the current T:System.Globalization.CultureInfo is read-only; otherwise, false
. The default is false
.Definition at line 635 of file CultureInfo.cs.
|
get |
Gets the active input locale identifier.
Definition at line 310 of file CultureInfo.cs.
|
get |
Gets the culture name in the format languagecode2-country/regioncode2.
Definition at line 321 of file CultureInfo.cs.
|
get |
Gets the culture name, consisting of the language, the country/region, and the optional script, that the culture is set to display.
Definition at line 386 of file CultureInfo.cs.
|
getset |
Gets or sets a T:System.Globalization.NumberFormatInfo that defines the culturally appropriate format of displaying numbers, currency, and percentage.
T:System.ArgumentNullException | The property is set to null. |
T:System.InvalidOperationException | The P:System.Globalization.CultureInfo.NumberFormat property or any of the T:System.Globalization.NumberFormatInfo properties is set, and the T:System.Globalization.CultureInfo is read-only. |
Definition at line 533 of file CultureInfo.cs.
|
get |
Gets the list of calendars that can be used by the culture.
Definition at line 611 of file CultureInfo.cs.
|
get |
Gets the T:System.Globalization.CultureInfo that represents the parent culture of the current T:System.Globalization.CultureInfo.
Definition at line 275 of file CultureInfo.cs.
|
get |
Gets the T:System.Globalization.TextInfo that defines the writing system associated with the culture.
Definition at line 480 of file CultureInfo.cs.
|
get |
Gets the ISO 639-2 three-letter code for the language of the current T:System.Globalization.CultureInfo.
Definition at line 424 of file CultureInfo.cs.
|
get |
Gets the three-letter code for the language as defined in the Windows API.
Definition at line 435 of file CultureInfo.cs.
|
get |
Gets the ISO 639-1 two-letter code for the language of the current T:System.Globalization.CultureInfo.
Definition at line 412 of file CultureInfo.cs.