[Serializable] |
To create a TextInfo for any culture, use the CultureInfo.TextInfo property.
The user might choose to override some of the values associated with the current culture of Windows through Regional and Language Options (or Regional Options or Regional Settings) in Control Panel. For example, the user might choose to display the date in a different format or to use a currency other than the default for the culture. If the CultureInfo.UseUserOverride property is set to true, the properties of the CultureInfo.DateTimeFormat instance, the CultureInfo.NumberFormat instance, and the CultureInfo.TextInfo instance are also retrieved from the user settings. If the user settings are incompatible with the culture associated with the CultureInfo (for example, if the selected calendar is not one of the CultureInfo.OptionalCalendars), the results of the methods and the values of the properties are undefined.
ANSICodePage | Read-only Gets the American National Standards Institute (ANSI) code page used by the writing system represented by the current TextInfo. |
EBCDICCodePage | Read-only Gets the Extended Binary Coded Decimal Interchange Code (EBCDIC) code page used by the writing system represented by the current TextInfo. |
ListSeparator | Read-only Gets the string that separates items in a list. |
MacCodePage | Read-only Gets the Macintosh code page used by the writing system represented by the current TextInfo. |
OEMCodePage | Read-only Gets the original equipment manufacturer (OEM) code page used by the writing system represented by the current TextInfo. |
Equals | Overridden: Determines whether the specified object represents the same writing system as the current TextInfo. |
GetHashCode | Overridden: Serves as a hash function for the current TextInfo, suitable for use in hashing algorithms and data structures, such as a hash table. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
ToLower | Overloaded:ToLower(char c) Converts the specified character to lowercase. |
ToLower | Overloaded:ToLower(string str) Converts the specified string to lowercase. |
ToString | Overridden: Returns a string that represents the current TextInfo. |
ToTitleCase | Converts the specified string to titlecase. |
ToUpper | Overloaded:ToUpper(char c) Converts the specified character to uppercase. |
ToUpper | Overloaded:ToUpper(string str) Converts the specified string to uppercase. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
public virtual int ANSICodePage {get;}
|
public virtual int EBCDICCodePage {get;}
|
public virtual string ListSeparator {get;}
|
public virtual int MacCodePage {get;}
|
public virtual int OEMCodePage {get;}
|
obj
~TextInfo(); |
public override int GetHashCode(); |
This method generates the same hash code for two objects that are equal according to the TextInfo.Equals method.
public Type GetType(); |
protected object MemberwiseClone(); |
c
The invariant culture must be used only by processes that require culture-independent results, such as system services; otherwise, it produces results that might be linguistically incorrect or culturally inappropriate.
For more information on cultures, see CultureInfo.
str
Exception Type | Condition |
---|---|
ArgumentNullException | str is null. |
Casing semantics depend on the culture in use. If using the invariant culture, the casing semantics are not culture-sensitive. If using a specific culture, the casing semantics are sensitive to that culture.
The invariant culture must be used only by processes that require culture-independent results, such as system services; otherwise, it produces results that might be linguistically incorrect or culturally inappropriate.
For more information on cultures, see CultureInfo.
public override string ToString(); |
str
Exception Type | Condition |
---|---|
ArgumentNullException | str is null. |
The returned string might differ in length from the input string. For more information on casing, refer to the Unicode Technical Report #21 "Case Mappings," published by the Unicode Consortium (http://www.unicode.org). The current implementation preserves the length of the string; however, this behavior is not guaranteed and could change in future implementations.
Casing semantics depend on the culture in use. If using the invariant culture, the casing semantics are not culture-sensitive. If using a specific culture, the casing semantics are sensitive to that culture. Words that are selected for title casing depend on the language.
The invariant culture must be used only by processes that require culture-independent results, such as system services; otherwise, it produces results that might be linguistically incorrect or culturally inappropriate.
For more information on cultures, see CultureInfo.
c
The invariant culture must be used only by processes that require culture-independent results, such as system services; otherwise, it produces results that might be linguistically incorrect or culturally inappropriate.
For more information on cultures, see CultureInfo.
str
Exception Type | Condition |
---|---|
ArgumentNullException | str is null. |
Casing semantics depend on the culture in use. If using the invariant culture, the casing semantics are not culture-sensitive. If using a specific culture, the casing semantics are sensitive to that culture.
The invariant culture must be used only by processes that require culture-independent results, such as system services; otherwise, it produces results that might be linguistically incorrect or culturally inappropriate.
For more information on cultures, see CultureInfo.