CultureAndRegionInfoBuilder.Unregister(String) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Yerel bilgisayardan özel bir kültürü siler.
public:
static void Unregister(System::String ^ cultureName);
public static void Unregister (string cultureName);
static member Unregister : string -> unit
Public Shared Sub Unregister (cultureName As String)
Parametreler
- cultureName
- String
Silinecek özel kültürün adı.
Özel durumlar
cultureName
, bağımlı bir kültürün üst kültür veya konsol geri dönüş kullanıcı arabirimi kültürüdür.
Kullanıcının yönetici ayrıcalıkları yok.
cultureName
bulunamaz bir kültür belirtir.
Örnekler
Aşağıdaki örnekte yöntemi gösterilmektedir Unregister .
// 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.
*/
' 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.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
End Class
'
'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.
'
Açıklamalar
Unregister yöntemi, yönteminin tersini Register yapar. Register yöntemi, özel bir kültürü yerel bilgisayarda, Windows API'si GetWindowsDirectory işlevi tarafından döndürülen dizinin Genelleştirme alt dizininde bir dosya olarak depolar. Unregister yöntemi kalıcı özel kültür dosyasını bilgisayardan siler. Dosya silindikten sonra, bilgisayar belleğindeki özel kültürün mevcut örnekleri çalışmaya devam eder, ancak özel kültürün yeni örnekleri oluşturulamaz.