CultureAndRegionInfoBuilder.Unregister メソッド
アセンブリ: sysglobl (sysglobl.dll 内)
構文
- cultureName
カスタム カルチャの名前。
Unregister メソッドは、Register メソッドと逆の操作を実行します。Register メソッドは、カスタム カルチャをローカル コンピュータの %WINDIR%\Globalization ディレクトリにファイルとして格納します。Unregister メソッドは、永続的なカスタム カルチャ ファイルをコンピュータから削除します。ファイルを削除した後でも、コンピュータ メモリ上にあるカスタム カルチャの既存のインスタンスは動作し続けますが、カスタム カルチャの新しいインスタンスは作成できません。
Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition プラットフォームメモ : カスタム カルチャが使用されている場合、登録解除はできません。
' This example demonstrates the System.Globalization.Culture- ' AndRegionInfoBuilder Unregister method. ' Compile this example with a reference to sysglobl.dll. ' ' Notes: ' This example deletes the custom culture x-en-US-sample.nlp ' file, but not the %winnt%\Globalization directory that contains the file. ' Imports System Imports System.Globalization Class Sample Public Shared Sub Main() Try Console.Clear() Console.WriteLine("Unregister the ""x-en-US-sample"" " & _ "custom culture if it already exists...") CultureAndRegionInfoBuilder.Unregister("x-en-US-sample") Console.WriteLine("The custom culture was unregistered successfully.") Catch e As Exception Console.WriteLine("Error while unregistering...") Console.WriteLine(e) End Try End Sub 'Main End Class 'Sample ' 'This code example produces the following results: ' 'Unregister the "x-en-US-sample" custom culture if it already exists... 'The custom culture was unregistered successfully. '
// This example demonstrates the System.Globalization.Culture- // AndRegionInfoBuilder Unregister method. // Compile this example with a reference to sysglobl.dll. /* Notes: This example deletes the custom culture x-en-US-sample.nlp file, but not the %winnt%\Globalization directory that contains the file. */ using System; using System.Globalization; class Sample { public static void Main() { try { Console.Clear(); Console.WriteLine("Unregister the \"x-en-US-sample\" " + "custom culture if it already exists..."); CultureAndRegionInfoBuilder.Unregister("x-en-US-sample"); Console.WriteLine("The custom culture was unregistered successfully."); } catch (Exception e) { Console.WriteLine("Error while unregistering..."); Console.WriteLine(e); } } } /* This code example produces the following results: Unregister the "x-en-US-sample" custom culture if it already exists... The custom culture was unregistered successfully. */
プラットフォーム
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- CultureAndRegionInfoBuilder.Unregister メソッドのページへのリンク