ServiceDescriptionCollection.Remove(ServiceDescription) Metoda
Definicja
Ważny
Niektóre informacje dotyczą produktów przedpremierowych, które mogą zostać znacznie zmodyfikowane przed premierą. Microsoft nie udziela żadnych gwarancji, ani wyraźnych, ani domniemanych, dotyczących informacji podanych tutaj.
Usuwa pierwsze wystąpienie określonego ServiceDescription elementu z kolekcji.
public:
void Remove(System::Web::Services::Description::ServiceDescription ^ serviceDescription);
public void Remove(System.Web.Services.Description.ServiceDescription serviceDescription);
member this.Remove : System.Web.Services.Description.ServiceDescription -> unit
Public Sub Remove (serviceDescription As ServiceDescription)
Parametry
- serviceDescription
- ServiceDescription
Element ServiceDescription do usunięcia z kolekcji.
Przykłady
// Get the index of 'ServiceDescription' object.
int myIndex = myCollection.IndexOf(myServiceDescription2);
// Remove 'ServiceDescription' object from the collection.
myCollection.Remove(myServiceDescription2);
Console.WriteLine("Element at index {0} is removed ", myIndex);
' Get the index of 'ServiceDescription' object.
Dim myIndex As Integer = myCollection.IndexOf(myServiceDescription2)
' Remove 'ServiceDescription' object from the collection.
myCollection.Remove(myServiceDescription2)
Console.WriteLine("Element at index {0} is removed ", myIndex.ToString())
Uwagi
Ta metoda wykonuje wyszukiwanie liniowe; dlatego średni czas wykonywania jest proporcjonalny do Count.
Elementy, które następują po usunięciu ServiceDescription , przechodzą w górę, aby zajmować opuszczone miejsce.