RegionInfo.TwoLetterISORegionName 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
국가/지역의 ISO 3166에 정의된 두 글자 코드를 가져옵니다.
public:
virtual property System::String ^ TwoLetterISORegionName { System::String ^ get(); };
public virtual string TwoLetterISORegionName { get; }
member this.TwoLetterISORegionName : string
Public Overridable ReadOnly Property TwoLetterISORegionName As String
속성 값
국가/지역에 대해 ISO 3166에 정의된 두 글자 코드입니다.
예제
다음 코드 예제에서는 클래스의 속성을 표시 합니다 RegionInfo .
using System;
using System.Globalization;
public class SamplesRegionInfo {
public static void Main() {
// Displays the property values of the RegionInfo for "US".
RegionInfo myRI1 = new RegionInfo( "US" );
Console.WriteLine( " Name: {0}", myRI1.Name );
Console.WriteLine( " DisplayName: {0}", myRI1.DisplayName );
Console.WriteLine( " EnglishName: {0}", myRI1.EnglishName );
Console.WriteLine( " IsMetric: {0}", myRI1.IsMetric );
Console.WriteLine( " ThreeLetterISORegionName: {0}", myRI1.ThreeLetterISORegionName );
Console.WriteLine( " ThreeLetterWindowsRegionName: {0}", myRI1.ThreeLetterWindowsRegionName );
Console.WriteLine( " TwoLetterISORegionName: {0}", myRI1.TwoLetterISORegionName );
Console.WriteLine( " CurrencySymbol: {0}", myRI1.CurrencySymbol );
Console.WriteLine( " ISOCurrencySymbol: {0}", myRI1.ISOCurrencySymbol );
}
}
/*
This code produces the following output.
Name: US
DisplayName: United States
EnglishName: United States
IsMetric: False
ThreeLetterISORegionName: USA
ThreeLetterWindowsRegionName: USA
TwoLetterISORegionName: US
CurrencySymbol: $
ISOCurrencySymbol: USD
*/
Imports System.Globalization
Public Class SamplesRegionInfo
Public Shared Sub Main()
' Displays the property values of the RegionInfo for "US".
Dim myRI1 As New RegionInfo("US")
Console.WriteLine(" Name: {0}", myRI1.Name)
Console.WriteLine(" DisplayName: {0}", myRI1.DisplayName)
Console.WriteLine(" EnglishName: {0}", myRI1.EnglishName)
Console.WriteLine(" IsMetric: {0}", myRI1.IsMetric)
Console.WriteLine(" ThreeLetterISORegionName: {0}", myRI1.ThreeLetterISORegionName)
Console.WriteLine(" ThreeLetterWindowsRegionName: {0}", myRI1.ThreeLetterWindowsRegionName)
Console.WriteLine(" TwoLetterISORegionName: {0}", myRI1.TwoLetterISORegionName)
Console.WriteLine(" CurrencySymbol: {0}", myRI1.CurrencySymbol)
Console.WriteLine(" ISOCurrencySymbol: {0}", myRI1.ISOCurrencySymbol)
End Sub
End Class
'This code produces the following output.
'
' Name: US
' DisplayName: United States
' EnglishName: United States
' IsMetric: False
' ThreeLetterISORegionName: USA
' ThreeLetterWindowsRegionName: USA
' TwoLetterISORegionName: US
' CurrencySymbol: $
' ISOCurrencySymbol: USD
설명
이름은 RegionInfo 국가/지역의 ISO 3166에 정의된 두 글자 코드 중 하나입니다. 예를 들어 미국의 두 글자 코드는 "US"입니다.
Important
경우에 따라 속성에 TwoLetterISORegionName 두 개 이상의 문자가 있을 수 있습니다. 예를 들어 카리브해 지역의 속성 값 TwoLetterISORegionName 은 "029"입니다.
경우는 중요하지 않습니다. 그러나 , TwoLetterISORegionName및 ThreeLetterISORegionName 속성은 Name적절한 코드를 대문자로 반환합니다.
Warning
개체를 RegionInfo 유지하거나 프로세스 간에 통신하려는 경우 두 글자 ISO 지역 코드가 아닌 전체 문화권 이름을 사용하여 인스턴스화해야 합니다. 속성은 스크립트와 언어에 따라 달라지므로 RegionInfo 지역 코드만 사용하여 개체를 인스턴스화 RegionInfo 하면 컨텍스트와 데이터가 손실됩니다.
미리 정의된 RegionInfo 이름은 ISO 3166: 국가 코드에 나열됩니다.