다음을 통해 공유


RegionInfo.TwoLetterISORegionName 속성

해당 국가/지역에 대해 ISO 3166에 정의되어 있는 두 문자로 된 코드를 가져옵니다.

네임스페이스: System.Globalization
어셈블리: mscorlib(mscorlib.dll)

구문

‘선언
Public Overridable ReadOnly Property TwoLetterISORegionName As String
‘사용 방법
Dim instance As RegionInfo
Dim value As String

value = instance.TwoLetterISORegionName
public virtual string TwoLetterISORegionName { get; }
public:
virtual property String^ TwoLetterISORegionName {
    String^ get ();
}
/** @property */
public String get_TwoLetterISORegionName ()
public function get TwoLetterISORegionName () : String

속성 값

해당 국가/지역에 대해 ISO 3166에 정의되어 있는 두 문자로 된 코드입니다.

설명

RegionInfo 이름은 해당 국가/지역에 대해 ISO 3166에 정의되어 있는 두 문자로 된 코드 중 하나입니다. 예를 들어, 미국을 나타내는 두 문자로 된 코드는 "US"입니다.

이 코드는 대/소문자를 구분하지는 않지만 Name, TwoLetterISORegionNameThreeLetterISORegionName 속성은 해당 코드를 대문자로 반환합니다.

미리 정의된 RegionInfo 이름은 RegionInfo 클래스 항목에 나열되어 있습니다.

예제

다음 코드 예제에서는 RegionInfo 클래스의 속성을 표시합니다.

Imports System
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 'Main 

End Class 'SamplesRegionInfo


'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

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

*/
using namespace System;
using namespace System::Globalization;
int main()
{
   
   // Displays the property values of the RegionInfo for "US".
   RegionInfo^ myRI1 = gcnew 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

*/
import System.*;
import System.Globalization.*;

public class SamplesRegionInfo
{  
    public static void main(String[] args)
    {
        // Displays the property values of the RegionInfo for "US".
        RegionInfo myRI1 =  new RegionInfo("US");
        Console.WriteLine("   Name:                         {0}",
            myRI1.get_Name());
        Console.WriteLine("   DisplayName:                  {0}",
            myRI1.get_DisplayName());
        Console.WriteLine("   EnglishName:                  {0}",
            myRI1.get_EnglishName());
        Console.WriteLine("   IsMetric:                     {0}",
            System.Convert.ToString( myRI1.get_IsMetric()));
        Console.WriteLine("   ThreeLetterISORegionName:     {0}", 
            myRI1.get_ThreeLetterISORegionName());
        Console.WriteLine("   ThreeLetterWindowsRegionName: {0}",
            myRI1.get_ThreeLetterWindowsRegionName());
        Console.WriteLine("   TwoLetterISORegionName:       {0}", 
            myRI1.get_TwoLetterISORegionName());
        Console.WriteLine("   CurrencySymbol:               {0}", 
            myRI1.get_CurrencySymbol());
        Console.WriteLine("   ISOCurrencySymbol:            {0}",
            myRI1.get_ISOCurrencySymbol());
    } //main
} //SamplesRegionInfo

/*
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

*/

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

.NET Compact Framework

2.0, 1.0에서 지원

참고 항목

참조

RegionInfo 클래스
RegionInfo 멤버
System.Globalization 네임스페이스
RegionInfo.Name 속성
RegionInfo.EnglishName 속성
RegionInfo.DisplayName 속성
RegionInfo.ThreeLetterISORegionName 속성
RegionInfo.ThreeLetterWindowsRegionName 속성