Share via


NameValueConfigurationCollection.Remove 方法

定义

从集合中移除 NameValueConfigurationElement 对象。

重载

Remove(NameValueConfigurationElement)

基于所提供的参数,从集合中移除 NameValueConfigurationElement 对象。

Remove(String)

基于所提供的参数,从集合中移除 NameValueConfigurationElement 对象。

Remove(NameValueConfigurationElement)

Source:
NameValueConfigurationCollection.cs
Source:
NameValueConfigurationCollection.cs
Source:
NameValueConfigurationCollection.cs

基于所提供的参数,从集合中移除 NameValueConfigurationElement 对象。

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)

参数

示例

下面的代码示例演示如何使用 Remove 方法。 此代码示例是为 NameValueConfigurationCollection 类提供的一个更大示例的一部分。

// 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)

注解

Remove使用 方法从集合中删除 NameValueConfigurationElement 。 如果在删除 元素时需要自定义行为,则在派生类中重写。

适用于

Remove(String)

Source:
NameValueConfigurationCollection.cs
Source:
NameValueConfigurationCollection.cs
Source:
NameValueConfigurationCollection.cs

基于所提供的参数,从集合中移除 NameValueConfigurationElement 对象。

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

参数

name
String

NameValueConfigurationElement 对象的名称。

注解

Remove使用 方法从集合中删除 NameValueConfigurationElement 。 如果在删除 元素时需要自定义行为,则在派生类中重写。

适用于