다음을 통해 공유


RegionInfo.DisplayName 속성

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

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

구문

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

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

속성 값

지역화된 .NET Framework 언어로 표시되는 해당 국가/지역의 전체 이름입니다.

설명

DisplayName 속성은 국가/지역 이름을 지역화된 .NET Framework 버전의 언어로 표시합니다. 예를 들어, DisplayName 속성은 국가/지역을 .NET Framework 영어 버전에서는 영어로 표시하고, .NET Framework 스페인어 버전에서는 스페인어로 표시합니다.

예제

다음 코드 예제에서는 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에서 지원

참고 항목

참조

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