NameValueConfigurationCollection.Remove 方法    
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从集合中移除 NameValueConfigurationElement 对象。
重载
| Remove(NameValueConfigurationElement) | 基于所提供的参数,从集合中移除 NameValueConfigurationElement 对象。 | 
| Remove(String) | 基于所提供的参数,从集合中移除 NameValueConfigurationElement 对象。 | 
Remove(NameValueConfigurationElement)
基于所提供的参数,从集合中移除 NameValueConfigurationElement 对象。
public:
 void Remove(System::Configuration::NameValueConfigurationElement ^ nameValue);public void Remove (System.Configuration.NameValueConfigurationElement nameValue);member this.Remove : System.Configuration.NameValueConfigurationElement -> unitPublic Sub Remove (nameValue As NameValueConfigurationElement)参数
- nameValue
- 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)
基于所提供的参数,从集合中移除 NameValueConfigurationElement 对象。
public:
 void Remove(System::String ^ name);public void Remove (string name);member this.Remove : string -> unitPublic Sub Remove (name As String)参数
- name
- String
注解
Remove使用 方法从集合中删除 NameValueConfigurationElement 。 如果在删除 元素时需要自定义行为,则在派生类中重写。