ConfigurationElementCollection.BaseRemove(Object) Metoda
Definicja
Usuwa ConfigurationElement z kolekcji.Removes a ConfigurationElement from the collection.
protected:
void BaseRemove(System::Object ^ key);
protected public:
void BaseRemove(System::Object ^ key);
protected void BaseRemove (object key);
protected internal void BaseRemove (object key);
member this.BaseRemove : obj -> unit
Protected Sub BaseRemove (key As Object)
Protected Friend Sub BaseRemove (key As Object)
Parametry
- key
- Object
Klucz ConfigurationElement do usunięcia.The key of the ConfigurationElement to remove.
Wyjątki
Nie ConfigurationElement istnieje określony klucz w kolekcji, element został już usunięty lub nie można usunąć elementu, ponieważ jego wartość Type nie jest AddRemoveClearMap .No ConfigurationElement with the specified key exists in the collection, the element has already been removed, or the element cannot be removed because the value of its Type is not AddRemoveClearMap.
Przykłady
Poniższy przykład kodu pokazuje, jak wywołać BaseRemove metodę.The following code example shows how to call the BaseRemove method.
public void Remove(UrlConfigElement url)
{
if (BaseIndexOf(url) >= 0)
{
BaseRemove(url.Name);
// Your custom code goes here.
Console.WriteLine("UrlsCollection: {0}", "Removed collection element!");
}
}
Public Sub Remove(ByVal url As UrlConfigElement)
If BaseIndexOf(url) >= 0 Then
BaseRemove(url.Name)
' Your custom code goes here.
Console.WriteLine("UrlsCollection: {0}", "Removed collection element!")
End If
End Sub
Uwagi
BaseRemoveMetoda wstawia do <remove>
pliku konfiguracji dyrektywę ConfigurationElement z określonym kluczem.The BaseRemove method inserts a <remove>
directive into the configuration file for the ConfigurationElement with the specified key.