NameValueConfigurationCollection.Remove Metod

Definition

Tar bort ett NameValueConfigurationElement objekt från samlingen.

Överlagringar

Name Description
Remove(NameValueConfigurationElement)

Tar bort ett NameValueConfigurationElement objekt från samlingen baserat på den angivna parametern.

Remove(String)

Tar bort ett NameValueConfigurationElement objekt från samlingen baserat på den angivna parametern.

Remove(NameValueConfigurationElement)

Källa:
NameValueConfigurationCollection.cs
Källa:
NameValueConfigurationCollection.cs
Källa:
NameValueConfigurationCollection.cs
Källa:
NameValueConfigurationCollection.cs
Källa:
NameValueConfigurationCollection.cs
Källa:
NameValueConfigurationCollection.cs
Källa:
NameValueConfigurationCollection.cs
Källa:
NameValueConfigurationCollection.cs

Tar bort ett NameValueConfigurationElement objekt från samlingen baserat på den angivna parametern.

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)

Parametrar

Exempel

I följande kodexempel visas hur du använder Remove metoden. Det här kodexemplet är en del av ett större exempel för NameValueConfigurationCollection klassen.

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

Kommentarer

Använd metoden Remove för att ta bort en NameValueConfigurationElement från samlingen. Åsidosätt i en härledd klass om anpassat beteende krävs när elementet tas bort.

Gäller för

Remove(String)

Källa:
NameValueConfigurationCollection.cs
Källa:
NameValueConfigurationCollection.cs
Källa:
NameValueConfigurationCollection.cs
Källa:
NameValueConfigurationCollection.cs
Källa:
NameValueConfigurationCollection.cs
Källa:
NameValueConfigurationCollection.cs
Källa:
NameValueConfigurationCollection.cs
Källa:
NameValueConfigurationCollection.cs

Tar bort ett NameValueConfigurationElement objekt från samlingen baserat på den angivna parametern.

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

Parametrar

name
String

Namnet på NameValueConfigurationElement objektet.

Kommentarer

Använd metoden Remove för att ta bort en NameValueConfigurationElement från samlingen. Åsidosätt i en härledd klass om anpassat beteende krävs när elementet tas bort.

Gäller för