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
특성

예제

다음 예제에서는 클래스의 여러 멤버를 보여 줍니다 RegionInfo .

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 );
   Console::WriteLine();
   
   // Compares the RegionInfo above with another RegionInfo created using CultureInfo.
   RegionInfo^ myRI2 = gcnew RegionInfo( (gcnew 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.

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

설명

이 API에 대한 자세한 내용은 RegionInfo에 대한 추가 API 설명을 참조하세요.

생성자

RegionInfo(Int32)

지정된 문화권 식별자와 관련된 국가/지역을 기반으로 하는 RegionInfo 클래스의 새 인스턴스를 초기화합니다.

RegionInfo(String)

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

속성

CurrencyEnglishName

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

CurrencyNativeName

국가/지역에서 사용되는 통화 이름을 국가/지역의 네이티브 언어 형식으로 가져옵니다.

CurrencySymbol

해당 국가/지역과 관련된 통화 기호를 가져옵니다.

CurrentRegion

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

DisplayName

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

EnglishName

영어로 표시되는 해당 국가/지역의 전체 이름을 가져옵니다.

GeoId

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

IsMetric

해당 국가/지역의 측정 단위가 미터법인지 여부를 나타내는 값을 가져옵니다.

ISOCurrencySymbol

해당 국가/지역과 관련된 세 문자로 된 ISO 4217 통화 기호를 가져옵니다.

Name

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

NativeName

국가/지역의 이름은 국가/지역의 네이티브 언어 형식으로 가져옵니다.

ThreeLetterISORegionName

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

ThreeLetterWindowsRegionName

RegionInfo가 나타내는 국가/지역에 대해 Windows에서 할당한 세 문자로 된 코드를 가져옵니다.

TwoLetterISORegionName

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

메서드

Equals(Object)

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

GetHashCode()

해시 알고리즘과 해시 테이블 같은 데이터 구조에 적합한 현재 RegionInfo에 대한 해시 함수의 역할을 합니다.

GetType()

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

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

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

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

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

적용 대상

추가 정보