NameValueConfigurationCollection.Remove 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 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)
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
- nameValue
- NameValueConfigurationElement
A NameValueConfigurationElement object.
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)
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
.NET