TextInfo.CultureName 屬性

定義

取得文化特性的名稱,這個文化特性與目前 TextInfo 物件關聯。

public:
 property System::String ^ CultureName { System::String ^ get(); };
public string CultureName { get; }
[System.Runtime.InteropServices.ComVisible(false)]
public string CultureName { get; }
member this.CultureName : string
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.CultureName : string
Public ReadOnly Property CultureName As String

屬性值

String

文化特性的名稱。

屬性

備註

TextInfo物件是從特定文化特性建立,而屬性則會傳回 CultureName 該文化特性的名稱。

CultureName屬性一律會反映特定文化特性,而不是中性文化特性。 如果 CultureInfo.Name 有中立的文化特性做為其值,則對應的會 CultureName 使用相同語言的任意特定文化特性做為其值。 例如, Name 屬性會針對英文的中性文化特性傳回 "en",但對應的 CultureName 屬性可能會傳回英文 (美國) 文化特性的 "en-us"。 如果 TextInfo 物件與特定文化特性相關聯,而不是中性文化特性,則其屬性的值 CultureName 一律與 Name 相關聯物件的屬性值相同 CultureInfo

同樣地, CultureName 屬性絕不會反映特定的排序。 它一定會對應到預設的排序次序。 例如,西班牙文 (西班牙) 的預設排序次序是國際排序次序。 如果 CultureInfo.Name 是以傳統排序次序 ES_tradnl 的 (西班牙文) 則對應的 CultureName 是使用預設國際排序次序) 的 Es (西班牙文。

適用於