TextInfo TextInfo TextInfo TextInfo Class

定義

定義文字屬性和行為,例如書寫系統特有的大小寫。Defines text properties and behaviors, such as casing, that are specific to a writing system.

public ref class TextInfo : ICloneable, System::Runtime::Serialization::IDeserializationCallback
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class TextInfo : ICloneable, System.Runtime.Serialization.IDeserializationCallback
type TextInfo = class
    interface ICloneable
    interface IDeserializationCallback
Public Class TextInfo
Implements ICloneable, IDeserializationCallback
繼承
TextInfoTextInfoTextInfoTextInfo
屬性
實作

備註

書寫系統是指令碼和表示為文字的語言所需的拼字規則的集合。A writing system is the collection of scripts and orthographic rules required to represent a language as text. TextInfo類別代表的書寫系統。The TextInfo class represents a writing system.

應用程式應該使用CultureInfo.TextInfo屬性,以取得TextInfo特定的物件CultureInfo物件。The application should use the CultureInfo.TextInfo property to obtain the TextInfo object for a particular CultureInfo object. 如果安全性決策是根據字串比較或大小寫變更作業而定,應該使用應用程式CultureInfo.TextInfo屬性所傳回的物件CultureInfo.InvariantCulture屬性,以確保作業的行為一致無關作業系統的文化特性設定。If a security decision depends on a string comparison or a case-change operation, the application should use the CultureInfo.TextInfo property of the object returned by the CultureInfo.InvariantCulture property to ensure that the behavior of the operation is consistent regardless of the operating system culture settings.

OverridesOverrides

使用者可以使用 [控制台] 的 [地區及語言選項] 部分,來覆寫目前的文化特性的 Windows 與相關聯的值。The user might use the regional and language options portion of Control Panel to override the values associated with the current culture of Windows. 比方說,使用者可能會選擇不同的格式顯示日期,或使用文化特性的預設值以外的貨幣。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. 如果CultureInfo.UseUserOverride屬性設定為true,所傳回的物件的屬性值CultureInfo.DateTimeFormatCultureInfo.NumberFormat,和CultureInfo.TextInfo屬性也都擷取自使用者設定。If the CultureInfo.UseUserOverride property is set to true, the property values of the objects returned by the CultureInfo.DateTimeFormat, CultureInfo.NumberFormat, and CultureInfo.TextInfo properties are also retrieved from the user settings. 如果使用者設定都與相關聯的文化特性不相容CultureInfo,例如,如果所選行事曆不是其中一個OptionalCalendars,不會定義方法的結果和屬性的值。If the user settings are incompatible with the culture associated with the CultureInfo, for example, if the selected calendar is not one of the OptionalCalendars, the results of the methods and the values of the properties are undefined.

屬性

ANSICodePage ANSICodePage ANSICodePage ANSICodePage

取得目前 TextInfo 所代表的書寫系統使用的美國國家標準局 (ANSI) 字碼頁 (Code Page)。Gets the American National Standards Institute (ANSI) code page used by the writing system represented by the current TextInfo.

CultureName CultureName CultureName CultureName

取得文化特性的名稱,這個文化特性與目前 TextInfo 物件關聯。Gets the name of the culture associated with the current TextInfo object.

EBCDICCodePage EBCDICCodePage EBCDICCodePage EBCDICCodePage

取得目前 TextInfo 所代表書寫系統使用的擴充二進碼十進位交換碼 (EBCDIC) 字碼頁。Gets the Extended Binary Coded Decimal Interchange Code (EBCDIC) code page used by the writing system represented by the current TextInfo.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

取得值,指出目前 TextInfo 物件是否為唯讀。Gets a value indicating whether the current TextInfo object is read-only.

IsRightToLeft IsRightToLeft IsRightToLeft IsRightToLeft

取得值,指出目前 TextInfo 物件是否表示從右到左書寫文字的書寫系統。Gets a value indicating whether the current TextInfo object represents a writing system where text flows from right to left.

LCID LCID LCID LCID

取得與目前 TextInfo 物件關聯之文化特性的文化特性識別項。Gets the culture identifier for the culture associated with the current TextInfo object.

ListSeparator ListSeparator ListSeparator ListSeparator

取得或設定清單中分隔項目的字串。Gets or sets the string that separates items in a list.

MacCodePage MacCodePage MacCodePage MacCodePage

取得目前 TextInfo 所代表的書寫系統使用的 Macintosh 字碼頁。Gets the Macintosh code page used by the writing system represented by the current TextInfo.

OEMCodePage OEMCodePage OEMCodePage OEMCodePage

取得目前 TextInfo 所代表的書寫系統使用的原來設備製造商 (OEM) 字碼頁。Gets the original equipment manufacturer (OEM) code page used by the writing system represented by the current TextInfo.

方法

Clone() Clone() Clone() Clone()

建立目前 TextInfo 物件複本的新物件。Creates a new object that is a copy of the current TextInfo object.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否代表與目前 TextInfo 物件相同的書寫系統。Determines whether the specified object represents the same writing system as the current TextInfo object.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為目前 TextInfo 的雜湊函式,適合於雜湊演算法和資料結構 (如雜湊資料表)。Serves as a hash function for the current TextInfo, suitable for hashing algorithms and data structures, such as a hash table.

GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ReadOnly(TextInfo) ReadOnly(TextInfo) ReadOnly(TextInfo) ReadOnly(TextInfo)

傳回指定之 TextInfo 物件的唯讀版本。Returns a read-only version of the specified TextInfo object.

ToLower(Char) ToLower(Char) ToLower(Char) ToLower(Char)

轉換指定字元為小寫。Converts the specified character to lowercase.

ToLower(String) ToLower(String) ToLower(String) ToLower(String)

轉換指定字串為小寫。Converts the specified string to lowercase.

ToString() ToString() ToString() ToString()

傳回表示目前 TextInfo 的字串。Returns a string that represents the current TextInfo.

ToTitleCase(String) ToTitleCase(String) ToTitleCase(String) ToTitleCase(String)

將指定的字串轉換為字首大寫 (除了視為縮略字的完全大寫文字例外)。Converts the specified string to title case (except for words that are entirely in uppercase, which are considered to be acronyms).

ToUpper(Char) ToUpper(Char) ToUpper(Char) ToUpper(Char)

轉換指定字元為大寫。Converts the specified character to uppercase.

ToUpper(String) ToUpper(String) ToUpper(String) ToUpper(String)

轉換指定字串為大寫。Converts the specified string to uppercase.

明確介面實作

IDeserializationCallback.OnDeserialization(Object) IDeserializationCallback.OnDeserialization(Object) IDeserializationCallback.OnDeserialization(Object) IDeserializationCallback.OnDeserialization(Object)

還原序列化 (Deserialization) 完成後,引發還原序列化事件。Raises the deserialization event when deserialization is complete.

適用於

另請參閱