RegionInfo 클래스

정의

국가/지역에 대한 정보를 포함합니다.

public ref class RegionInfo
public class RegionInfo
[System.Serializable]
public class RegionInfo
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public class RegionInfo
type RegionInfo = class
[<System.Serializable>]
type RegionInfo = class
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type RegionInfo = class
Public Class RegionInfo
상속
RegionInfo
특성

설명

이 API에 대한 자세한 내용은 RegionInfo에 대한 추가 API 비고를 참조하세요.

예시

다음 예제에서는 클래스의 여러 멤버를 보여 줍니다 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 );
      Console.WriteLine();

      // Compares the RegionInfo above with another RegionInfo created using CultureInfo.
      RegionInfo myRI2 = new RegionInfo( new CultureInfo("en-US",false).LCID );
      if ( myRI1.Equals( myRI2 ) )
         Console.WriteLine( "The two RegionInfo instances are equal." );
      else
         Console.WriteLine( "The two RegionInfo instances are NOT equal." );
   }
}

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

The two RegionInfo instances are equal.

*/
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)
      Console.WriteLine()

      ' Compares the RegionInfo above with another RegionInfo created using CultureInfo.
      Dim myRI2 As New RegionInfo(New CultureInfo("en-US", False).LCID)
      If myRI1.Equals(myRI2) Then
         Console.WriteLine("The two RegionInfo instances are equal.")
      Else
         Console.WriteLine("The two RegionInfo instances are NOT equal.")
      End If 

   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
'
'The two RegionInfo instances are equal.

생성자

Name Description
RegionInfo(Int32)

지정된 문화권 식별자와 연결된 국가/지역에 따라 클래스의 새 인스턴스 RegionInfo 를 초기화합니다.

RegionInfo(String)

이름으로 지정된 국가/지역 또는 특정 문화권에 따라 클래스의 RegionInfo 새 인스턴스를 초기화합니다.

속성

Name Description
CurrencyEnglishName

국가/지역에서 사용되는 통화의 이름을 영어로 가져옵니다.

CurrencyNativeName

국가/지역의 모국어로 서식이 지정된 국가/지역에서 사용되는 통화의 이름을 가져옵니다.

CurrencySymbol

국가/지역과 연결된 통화 기호를 가져옵니다.

CurrentRegion

현재 스레드에서 RegionInfo 사용하는 국가/지역을 나타내는 값을 가져옵니다.

DisplayName

지역화된 버전의 .NET 언어로 국가/지역의 전체 이름을 가져옵니다.

EnglishName

영어로 된 국가/지역의 전체 이름을 가져옵니다.

GeoId

지리적 지역, 국가, 도시 또는 위치에 대한 고유 ID 번호를 가져옵니다.

IsMetric

국가/지역에서 측정에 메트릭 시스템을 사용하는지 여부를 나타내는 값을 가져옵니다.

ISOCurrencySymbol

국가/지역과 연결된 3자 ISO 4217 통화 기호를 가져옵니다.

Name

현재 RegionInfo 개체의 이름 또는 ISO 3166 두 글자 국가/지역 코드를 가져옵니다.

NativeName

국가/지역의 모국어로 서식이 지정된 국가/지역의 이름을 가져옵니다.

ThreeLetterISORegionName

국가/지역의 ISO 3166에 정의된 세 글자 코드를 가져옵니다.

ThreeLetterWindowsRegionName

RegionInfo 표시되는 국가/지역에 Windows 할당된 세 글자 코드를 가져옵니다.

TwoLetterISORegionName

국가/지역의 ISO 3166에 정의된 두 글자 코드를 가져옵니다.

메서드

Name Description
Equals(Object)

지정된 개체가 현재 RegionInfo인스턴스와 같은지 여부를 확인합니다.

GetHashCode()

해시 알고리즘 및 해시 테이블과 같은 데이터 구조에 적합한 현재 RegionInfo해시 함수로 사용됩니다.

GetType()

현재 인스턴스의 Type 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 RegionInfo에 지정된 문화권 이름 또는 ISO 3166 두 글자 국가/지역 코드를 포함하는 문자열을 반환합니다.

적용 대상

추가 정보