ConfigurationElementCollection.BaseRemove(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
Parameters
- key
- Object
The key of the ConfigurationElement to remove.
Exceptions
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.
Examples
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
Remarks
The BaseRemove method inserts a <remove>
directive into the configuration file for the ConfigurationElement with the specified key.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기