NameValueConfigurationCollection.Remove 方法

定义

NameValueConfigurationElement 集合中删除对象。

重载

名称 说明
Remove(NameValueConfigurationElement)

NameValueConfigurationElement根据提供的参数从集合中删除对象。

Remove(String)

NameValueConfigurationElement根据提供的参数从集合中删除对象。

Remove(NameValueConfigurationElement)

Source:
NameValueConfigurationCollection.cs
Source:
NameValueConfigurationCollection.cs
Source:
NameValueConfigurationCollection.cs
Source:
NameValueConfigurationCollection.cs
Source:
NameValueConfigurationCollection.cs
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
Source:
NameValueConfigurationCollection.cs
Source:
NameValueConfigurationCollection.cs
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。 如果删除元素时需要自定义行为,则在派生类中重写。

适用于