ConfigurationElementCollection.BaseRemove(Object) ConfigurationElementCollection.BaseRemove(Object) ConfigurationElementCollection.BaseRemove(Object) ConfigurationElementCollection.BaseRemove(Object) Method

定義

ConfigurationElement をコレクションから削除します。Removes a ConfigurationElement from the collection.

protected public:
 void BaseRemove(System::Object ^ key);
protected internal void BaseRemove (object key);
member this.BaseRemove : obj -> unit
Protected Friend Sub BaseRemove (key As Object)

パラメーター

key
Object Object Object Object

削除する ConfigurationElement のキー。The key of the ConfigurationElement to remove.

例外

指定したキーを持つ ConfigurationElement がコレクションに存在しないか、この要素は既に削除されています。または、Type の値が 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.

次のコード例を呼び出す方法を示しています、BaseRemoveメソッド。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

注釈

BaseRemoveメソッドの挿入、<remove>の構成ファイルにディレクティブ、ConfigurationElement指定のキーを持つ。The BaseRemove method inserts a <remove> directive into the configuration file for the ConfigurationElement with the specified key.

適用対象