UrlMappingCollection.RemoveAt(Int32) Metod

Definition

Tar bort objektet UrlMapping med det angivna indexet från samlingen.

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 objektet som UrlMapping ska tas bort.

Exempel

Följande kodexempel tar UrlMapping bort objektet från UrlMappingCollection.

Se kodexemplet i klassavsnittet UrlMappingCollection för att lära dig hur du hämtar samlingen.


// Remove the URL at the 
// specified index from the collection.
urlMappings.RemoveAt(0);

// Update the configuration file.
if (!urlMappingSection.IsReadOnly())
  configuration.Save();
' Remove the URL at the 
' specified index from the collection.
urlMappings.RemoveAt(0)

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

Kommentarer

Metoden RemoveAt tar bort elementet addurlMappings i avsnittet på den aktuella hierarkinivån och infogar ett remove element. Remove-elementet 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