Edit

Share via


NameValueConfigurationCollection.Remove Method

Definition

Removes a NameValueConfigurationElement object from the collection.

Overloads

Remove(NameValueConfigurationElement)

Removes a NameValueConfigurationElement object from the collection based on the provided parameter.

Remove(String)

Removes a NameValueConfigurationElement object from the collection based on the provided parameter.

Remove(NameValueConfigurationElement)

Source:
NameValueConfigurationCollection.cs
Source:
NameValueConfigurationCollection.cs

Removes a NameValueConfigurationElement object from the collection based on the provided parameter.

public:
 void Remove(System::Configuration::NameValueConfigurationElement ^ nameValue);
public void Remove (System.Configuration.NameValueConfigurationElement nameValue);
member this.Remove : System.Configuration.NameValueConfigurationElement -> unit
Public Sub Remove (nameValue As NameValueConfigurationElement)

Parameters

Examples

The following code example demonstrates how to use the Remove method. This code example is part of a larger example provided for the NameValueConfigurationCollection class.

// Remove domain from the collection.
NameValueConfigurationElement myConfigElement =
    myNameValConfigCollection["domain"];
// Remove method.
myNameValConfigCollection.Remove(myConfigElement);
' Remove domain from the collection.
Dim myConfigElement As NameValueConfigurationElement = myNameValConfigCollection("domain")
' Remove method.
myNameValConfigCollection.Remove(myConfigElement)

Remarks

Use the Remove method to remove a NameValueConfigurationElement from the collection. Override in a derived class if custom behavior is required when the element is removed.

Applies to

Remove(String)

Source:
NameValueConfigurationCollection.cs
Source:
NameValueConfigurationCollection.cs

Removes a NameValueConfigurationElement object from the collection based on the provided parameter.

public:
 void Remove(System::String ^ name);
public void Remove (string name);
member this.Remove : string -> unit
Public Sub Remove (name As String)

Parameters

name
String

The name of the NameValueConfigurationElement object.

Remarks

Use the Remove method to remove a NameValueConfigurationElement from the collection. Override in a derived class if custom behavior is required when the element is removed.

Applies to