Share via


CultureAndRegionInfoBuilder.TwoLetterISORegionName 屬性

定義

取得或設定國家/地區在 ISO 3166 中定義的兩個字母代碼。

public:
 property System::String ^ TwoLetterISORegionName { System::String ^ get(); void set(System::String ^ value); };
public string TwoLetterISORegionName { get; set; }
member this.TwoLetterISORegionName : string with get, set
Public Property TwoLetterISORegionName As String

屬性值

為國家/地區定義於 ISO 3166 中的兩個字母代碼。

例外狀況

在設定作業中,此值為 null

設定作業中值的長度範圍並不是 1 到 8 個字元之間。

設定作業中的值包含不在以下範圍中的字元:'a' 到 'z'、'A' 到 'Z' 或 '0' 到 '9'。

在設定作業中,目前的自訂文化特性是中性文化特性。

備註

屬性 TwoLetterISORegionName 會對應至 TwoLetterISORegionName 屬性。

TwoLetterISORegionName屬性值是國家/地區 ISO 3166 中定義的兩個字母代碼之一。 例如,美國的兩個字母代碼是 “US”。 預先定義 RegionInfo 的名稱會列在類別主題中 RegionInfo

適用於