ServiceDescriptionCollection.Remove(ServiceDescription) Metodo

Definizione

Rimuove la prima occorrenza dell'oggetto ServiceDescription specificato dalla raccolta.

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)

Parametri

serviceDescription
ServiceDescription

Oggetto ServiceDescription da rimuovere dalla raccolta.

Esempio

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

Commenti

Questo metodo esegue una ricerca lineare; pertanto, il tempo medio di esecuzione è proporzionale a Count.

Gli elementi che seguono l'oggetto rimosso ServiceDescription si spostano verso l'alto per occupare il punto liberato.

Si applica a