RegionInfo.Name プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > RegionInfo.Name プロパティの意味・解説 

RegionInfo.Name プロパティ

現在の RegionInfo オブジェクトの名前、または ISO 3166定義された 2 文字の国/地域コード取得します

名前空間: System.Globalization
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

解説解説

現在の RegionInfo オブジェクトが、カルチャ識別子パラメータ受け入れSystem.Globalization.RegionInfo(Int32) コンストラクタ使用して作成され場合Name プロパティ値は、ISO 3166 で国/地域に対して定義された 2 文字コードいずれかになり、大文字表示されます。たとえば、米国の 2 文字コードは "US" です。

定義済みRegionInfo の名前は、RegionInfo クラストピック一覧表示されています。国/地域の完全名取得するには、DisplayName または EnglishName プロパティ使用します

使用例使用例

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

*/
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
RegionInfo クラス
RegionInfo メンバ
System.Globalization 名前空間
RegionInfo.EnglishName プロパティ
RegionInfo.DisplayName プロパティ
TwoLetterISORegionName
ThreeLetterISORegionName
ThreeLetterWindowsRegionName



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「RegionInfo.Name プロパティ」の関連用語

RegionInfo.Name プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



RegionInfo.Name プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS