ClientTargetCollection.RemoveAt(Int32) Metod

Definition

Tar bort objektet med det angivna samlingsindexet ClientTarget .

public:
 void RemoveAt(int index);
public void RemoveAt(int index);
member this.RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)

Parametrar

index
Int32

Samlingsindexet för att ClientTarget ta bort.

Exempel

Följande kodexempel tar ClientTarget bort objektet från ClientTargetCollection samlingen.

Information om hur du hämtar samlingen finns i kodexemplet i klassöversikten ClientTargetCollection .


// Remove the client target at the 
// specified index from the collection.
clientTargets.RemoveAt(0);

// Update the configuration file.
if (!clientTargetSection.IsReadOnly())
  configuration.Save();
' Remove the client target at the 
' specified index from the collection.
clientTargets.RemoveAt(0)

' Update the configuration file.
If Not clientTargetSection.IsReadOnly() Then
    configuration.Save()
End If

Kommentarer

Metoden RemoveAt tar bort elementet addclientTarget i avsnittet på den aktuella hierarkinivån och infogar ett remove element. Elementet remove tar effektivt bort referensen till elementet add som definierats i de överordnade konfigurationsfilerna på högre nivåer i hierarkin men tar inte bort det.

Gäller för

Se även