NameValueConfigurationCollection.Remove 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從集合中移除一個 NameValueConfigurationElement 物件。
多載
| 名稱 | Description |
|---|---|
| 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 -> unit
Public 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 方法將 a NameValueConfigurationElement 從收藏中移除。 若在移除元素時需要自訂行為,則在衍生類別中覆寫。
適用於
Remove(String)
根據所提供的參數從集合中移除物件 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 方法將 a NameValueConfigurationElement 從收藏中移除。 若在移除元素時需要自訂行為,則在衍生類別中覆寫。