CultureAndRegionInfoBuilder.Register メソッドとは?

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > CultureAndRegionInfoBuilder.Register メソッドの意味・解説 

CultureAndRegionInfoBuilder.Register メソッド

メモ : このメソッドは、.NET Framework version 2.0 で新しく追加されたものです。

現在の CultureAndRegionInfoBuilder オブジェクトローカル コンピュータ上でカスタム カルチャとして保持して、アプリケーションカルチャ使用できるようにします。

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

例外例外
解説解説
使用例使用

Register メソッドコード例を次に示します。

' This example demonstrates the System.Globalization.Culture-
' AndRegionInfoBuilder Register method.
' Compile this code example with a reference to sysglobl.dll.

Imports System
Imports System.Globalization

Class Sample
    Public Shared Sub Main()
 
        Dim cib As CultureAndRegionInfoBuilder
 = Nothing
        Try
            ' Create a CultureAndRegionInfoBuilder object named "x-en-US-sample".
            Console.WriteLine("Create and explore the CultureAndRegionInfoBuilder..."
 & vbCrLf)
            cib = New CultureAndRegionInfoBuilder("x-en-US-sample",
 CultureAndRegionModifiers.None)
            
            ' Populate the new CultureAndRegionInfoBuilder object with
 culture information.
            Dim ci As New
 CultureInfo("en-US")
            cib.LoadDataFromCultureInfo(ci)
            
            ' Populate the new CultureAndRegionInfoBuilder object with
 region information.
            Dim ri As New
 RegionInfo("US")
            cib.LoadDataFromRegionInfo(ri)
            
            ' Display some of the properties of the CultureAndRegionInfoBuilder
 object.
            Console.WriteLine("CultureName:. . . . . . . . . .
 {0}", cib.CultureName)
            Console.WriteLine("CultureEnglishName: . . . . . .
 {0}", cib.CultureEnglishName)
            Console.WriteLine("CultureNativeName:. . . . . . .
 {0}", cib.CultureNativeName)
            Console.WriteLine("GeoId:. . . . . . . . . . . . .
 {0}", cib.GeoId)
            Console.WriteLine("IsMetric: . . . . . . . . . . .
 {0}", cib.IsMetric)
            Console.WriteLine("ISOCurrencySymbol:. . . . . . .
 {0}", cib.ISOCurrencySymbol)
            Console.WriteLine("RegionEnglishName:. . . . . . .
 {0}", cib.RegionEnglishName)
            Console.WriteLine("RegionName: . . . . . . . . . .
 {0}", cib.RegionName)
            Console.WriteLine("RegionNativeName: . . . . . . .
 {0}", cib.RegionNativeName)
            Console.WriteLine("ThreeLetterISOLanguageName: . .
 {0}", cib.ThreeLetterISOLanguageName)
            Console.WriteLine("ThreeLetterISORegionName: . . .
 {0}", cib.ThreeLetterISORegionName)
            Console.WriteLine("ThreeLetterWindowsLanguageName:
 {0}", cib.ThreeLetterWindowsLanguageName)
            Console.WriteLine("ThreeLetterWindowsRegionName: .
 {0}", cib.ThreeLetterWindowsRegionName)
            Console.WriteLine("TwoLetterISOLanguageName: . . .
 {0}", cib.TwoLetterISOLanguageName)
            Console.WriteLine("TwoLetterISORegionName: . . . .
 {0}", cib.TwoLetterISORegionName)
            Console.WriteLine()
            
            ' Register the custom culture.
            Console.WriteLine("Register the custom culture...")
            cib.Register()
            
            ' Display some of the properties of the custom culture.
            Console.WriteLine("Create and explore the custom culture..."
 & vbCrLf)
            ci = New CultureInfo("x-en-US-sample")
            
            Console.WriteLine("Name: . . . . . . . . . . . . .
 {0}", ci.Name)
            Console.WriteLine("EnglishName:. . . . . . . . . .
 {0}", ci.EnglishName)
            Console.WriteLine("NativeName: . . . . . . . . . .
 {0}", ci.NativeName)
            Console.WriteLine("TwoLetterISOLanguageName: . . .
 {0}", ci.TwoLetterISOLanguageName)
            Console.WriteLine("ThreeLetterISOLanguageName: . .
 {0}", ci.ThreeLetterISOLanguageName)
            Console.WriteLine("ThreeLetterWindowsLanguageName:
 {0}", ci.ThreeLetterWindowsLanguageName)
            
            Console.WriteLine(vbCrLf & "Note:"
 & vbCrLf & "Use the example in the " &
 _
                              "Unregister method topic to remove
 the custom culture.")
        Catch e As Exception
            Console.WriteLine(e)
        End Try
    
    End Sub 'Main
End Class 'Sample

'This code example produces the following results:
'
'Create and explore the CultureAndRegionInfoBuilder...
'
'CultureName:. . . . . . . . . . x-en-US-sample
'CultureEnglishName: . . . . . . English (United States)
'CultureNativeName:. . . . . . . English (United States)
'GeoId:. . . . . . . . . . . . . 244
'IsMetric: . . . . . . . . . . . False
'ISOCurrencySymbol:. . . . . . . USD
'RegionEnglishName:. . . . . . . United States
'RegionName: . . . . . . . . . . x-en-US-sample
'RegionNativeName: . . . . . . . United States
'ThreeLetterISOLanguageName: . . eng
'ThreeLetterISORegionName: . . . USA
'ThreeLetterWindowsLanguageName: ENU
'ThreeLetterWindowsRegionName: . USA
'TwoLetterISOLanguageName: . . . en
'TwoLetterISORegionName: . . . . US
'
'Register the custom culture...
'Create and explore the custom culture...
'
'Name: . . . . . . . . . . . . . x-en-US-sample
'EnglishName:. . . . . . . . . . English (United States)
'NativeName: . . . . . . . . . . English (United States)
'TwoLetterISOLanguageName: . . . en
'ThreeLetterISOLanguageName: . . eng
'ThreeLetterWindowsLanguageName: ENU
'
'Note:
'Use the example in the Unregister method topic to remove the custom
 culture.
'
// This example demonstrates the System.Globalization.Culture-
// AndRegionInfoBuilder Register method.
// Compile this code example with a reference to sysglobl.dll.

using System;
using System.Globalization;

class Sample 
{
    public static void Main()
 
    {
    CultureAndRegionInfoBuilder cib = null;
    try 
    {
// Create a CultureAndRegionInfoBuilder object named "x-en-US-sample".
    Console.WriteLine("Create and explore the CultureAndRegionInfoBuilder...\n");
    cib = new CultureAndRegionInfoBuilder(
                         "x-en-US-sample", CultureAndRegionModifiers.None);

// Populate the new CultureAndRegionInfoBuilder object with culture
 information.
    CultureInfo ci = new CultureInfo("en-US");
    cib.LoadDataFromCultureInfo(ci);

// Populate the new CultureAndRegionInfoBuilder object with region information.
    RegionInfo  ri = new RegionInfo("US");
    cib.LoadDataFromRegionInfo(ri);

// Display some of the properties of the CultureAndRegionInfoBuilder
 object.
    Console.WriteLine("CultureName:. . . . . . . . . . {0}", cib.CultureName);
    Console.WriteLine("CultureEnglishName: . . . . . . {0}", cib.CultureEnglishName);
    Console.WriteLine("CultureNativeName:. . . . . . . {0}", cib.CultureNativeName);
    Console.WriteLine("GeoId:. . . . . . . . . . . . . {0}", cib.GeoId);
    Console.WriteLine("IsMetric: . . . . . . . . . . . {0}", cib.IsMetric);
    Console.WriteLine("ISOCurrencySymbol:. . . . . . . {0}", cib.ISOCurrencySymbol);
    Console.WriteLine("RegionEnglishName:. . . . . . . {0}", cib.RegionEnglishName);
    Console.WriteLine("RegionName: . . . . . . . . . . {0}", cib.RegionName);
    Console.WriteLine("RegionNativeName: . . . . . . . {0}", cib.RegionNativeName);
    Console.WriteLine("ThreeLetterISOLanguageName: . . {0}", cib.ThreeLetterISOLanguageName);
    Console.WriteLine("ThreeLetterISORegionName: . . . {0}", cib.ThreeLetterISORegionName);
    Console.WriteLine("ThreeLetterWindowsLanguageName: {0}", cib.ThreeLetterWindowsLanguageName);
    Console.WriteLine("ThreeLetterWindowsRegionName: . {0}", cib.ThreeLetterWindowsRegionName);
    Console.WriteLine("TwoLetterISOLanguageName: . . . {0}", cib.TwoLetterISOLanguageName);
    Console.WriteLine("TwoLetterISORegionName: . . . . {0}", cib.TwoLetterISORegionName);
    Console.WriteLine();

// Register the custom culture.
    Console.WriteLine("Register the custom culture...");
    cib.Register();

// Display some of the properties of the custom culture.
    Console.WriteLine("Create and explore the custom culture...\n");
    ci = new CultureInfo("x-en-US-sample");

    Console.WriteLine("Name: . . . . . . . . . . . . . {0}", ci.Name);
    Console.WriteLine("EnglishName:. . . . . . . . . . {0}", ci.EnglishName);
    Console.WriteLine("NativeName: . . . . . . . . . . {0}", ci.NativeName);
    Console.WriteLine("TwoLetterISOLanguageName: . . . {0}", ci.TwoLetterISOLanguageName);
    Console.WriteLine("ThreeLetterISOLanguageName: . . {0}", ci.ThreeLetterISOLanguageName);
    Console.WriteLine("ThreeLetterWindowsLanguageName: {0}", ci.ThreeLetterWindowsLanguageName);

    Console.WriteLine("\nNote:\n" +
        "Use the example in the Unregister method topic to
 remove the custom culture.");
    }
    catch (Exception e)
    {
        Console.WriteLine(e);
    }
    }
}
/*
This code example produces the following results:

Create and explore the CultureAndRegionInfoBuilder...

CultureName:. . . . . . . . . . x-en-US-sample
CultureEnglishName: . . . . . . English (United States)
CultureNativeName:. . . . . . . English (United States)
GeoId:. . . . . . . . . . . . . 244
IsMetric: . . . . . . . . . . . False
ISOCurrencySymbol:. . . . . . . USD
RegionEnglishName:. . . . . . . United States
RegionName: . . . . . . . . . . x-en-US-sample
RegionNativeName: . . . . . . . United States
ThreeLetterISOLanguageName: . . eng
ThreeLetterISORegionName: . . . USA
ThreeLetterWindowsLanguageName: ENU
ThreeLetterWindowsRegionName: . USA
TwoLetterISOLanguageName: . . . en
TwoLetterISORegionName: . . . . US

Register the custom culture...
Create and explore the custom culture...

Name: . . . . . . . . . . . . . x-en-US-sample
EnglishName:. . . . . . . . . . English (United States)
NativeName: . . . . . . . . . . English (United States)
TwoLetterISOLanguageName: . . . en
ThreeLetterISOLanguageName: . . eng
ThreeLetterWindowsLanguageName: ENU

Note:
Use the example in the Unregister method topic to remove the custom
 culture.

*/
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

辞書ショートカット

すべての辞書の索引

「CultureAndRegionInfoBuilder.Register メソッド」の関連用語

CultureAndRegionInfoBuilder.Register メソッドのお隣キーワード

   

英語⇒日本語
日本語⇒英語
   
検索ランキング



CultureAndRegionInfoBuilder.Register メソッドのページの著作権
Weblio 辞書情報提供元は参加元一覧にて確認できます。

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

©2020 Weblio RSS