RegionInfo.NativeName 속성

정의

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

public:
 virtual property System::String ^ NativeName { System::String ^ get(); };
public virtual string NativeName { get; }
[System.Runtime.InteropServices.ComVisible(false)]
public virtual string NativeName { get; }
member this.NativeName : string
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.NativeName : string
Public Overridable ReadOnly Property NativeName As String

속성 값

String

ISO 3166 국가/지역 코드와 연관된 언어 형식으로 표시된, 국가/지역의 네이티브 이름입니다.

특성

예제

다음 코드 예제는 NativeName 속성입니다.

// This example demonstrates the RegionInfo.EnglishName, NativeName,
// CurrencyEnglishName, CurrencyNativeName, and GeoId properties.

using namespace System;
using namespace System::Globalization;

int main()
{
    // Regional Info for Sweden
    RegionInfo^ ri = gcnew RegionInfo("SE");

    Console::WriteLine("Region English Name: . . . {0}", ri->EnglishName);
    Console::WriteLine("Native Name: . . . . . . . {0}", ri->NativeName);
    Console::WriteLine("Currency English Name: . . {0}",
        ri->CurrencyEnglishName);
    Console::WriteLine("Currency Native Name:. . . {0}",
        ri->CurrencyNativeName);
    Console::WriteLine("Geographical ID: . . . . . {0}", ri->GeoId);
}
/*
This code example produces the following results:

Region English Name: . . . Sweden
Native Name: . . . . . . . Sverige
Currency English Name: . . Swedish Krona
Currency Native Name:. . . Svensk krona
Geographical ID: . . . . . 221

*/
// This example demonstrates the RegionInfo.EnglishName, NativeName,
// CurrencyEnglishName, CurrencyNativeName, and GeoId properties.

using System;
using System.Globalization;

class Sample
{
    public static void Main()
    {
    RegionInfo ri = new RegionInfo("SE"); // Sweden

    Console.WriteLine("Region English Name: . . . {0}", ri.EnglishName);
    Console.WriteLine("Native Name: . . . . . . . {0}", ri.NativeName);
    Console.WriteLine("Currency English Name: . . {0}", ri.CurrencyEnglishName);
    Console.WriteLine("Currency Native Name:. . . {0}", ri.CurrencyNativeName);
    Console.WriteLine("Geographical ID: . . . . . {0}", ri.GeoId);
    }
}
/*
This code example produces the following results:

Region English Name: . . . Sweden
Native Name: . . . . . . . Sverige
Currency English Name: . . Swedish Krona
Currency Native Name:. . . Svensk krona
Geographical ID: . . . . . 221

*/
' This example demonstrates the RegionInfo.EnglishName, NativeName,
' CurrencyEnglishName, CurrencyNativeName, and GeoId properties.
Imports System.Globalization

Class Sample
   Public Shared Sub Main()
      Dim ri As New RegionInfo("SE") ' Sweden
      Console.WriteLine("Region English Name: . . . {0}", ri.EnglishName)
      Console.WriteLine("Native Name: . . . . . . . {0}", ri.NativeName)
      Console.WriteLine("Currency English Name: . . {0}", ri.CurrencyEnglishName)
      Console.WriteLine("Currency Native Name:. . . {0}", ri.CurrencyNativeName)
      Console.WriteLine("Geographical ID: . . . . . {0}", ri.GeoId)
   End Sub
End Class
'
'This code example produces the following results:
'
'Region English Name: . . . Sweden
'Native Name: . . . . . . . Sverige
'Currency English Name: . . Swedish Krona
'Currency Native Name:. . . Svensk krona
'Geographical ID: . . . . . 221
'

설명

참고

NativeName속성은 RegionInfo 전체 문화권 이름을 사용 하 여 개체를 생성 하는 경우 전체 문화권 이름을 검색 합니다.

문화권 이름을 사용 하는 것이 좋습니다. 예를 들어 영어 (미국)의 경우 "en-us"를 사용 하 여 속성에 액세스 하는 것이 좋습니다 NativeName . 이 속성에 사용 되는 문자열은 해당 국가/지역과 관련 된 언어에 따라 달라 집니다. 예를 들어 en-US 영어 (미국) 및 스페인어 (미국)에 대 한 문화권 이름은 es-US Windows Vista에서 다른 값을 검색할 수 있습니다. 따라서 RegionInfo 국가/지역 이름만 사용 하 여 개체를 만드는 US 것은 적절 한 문자열을 구분 하기에 충분 하지 않습니다.

적용 대상