Partager via


OperationBindingCollection.Remove(OperationBinding) Méthode

Définition

Supprime la première occurrence de la classe OperationBinding spécifiée de OperationBindingCollection.

public:
 void Remove(System::Web::Services::Description::OperationBinding ^ bindingOperation);
public void Remove (System.Web.Services.Description.OperationBinding bindingOperation);
member this.Remove : System.Web.Services.Description.OperationBinding -> unit
Public Sub Remove (bindingOperation As OperationBinding)

Paramètres

bindingOperation
OperationBinding

OperationBinding à supprimer de la collection.

Exemples

L'exemple suivant illustre l'utilisation de la méthode Remove.

// Get the OperationBinding of the Add operation from the collection.
OperationBinding^ myOperationBinding = myOperationBindingCollection[ 3 ];

// Remove the OperationBinding of the Add operation from
// the collection.
myOperationBindingCollection->Remove( myOperationBinding );
Console::WriteLine( "\nRemoved the OperationBinding of the "
"Add operation from the collection." );
// Get the OperationBinding of the Add operation from the collection.
OperationBinding myOperationBinding =
   myOperationBindingCollection[3];

// Remove the OperationBinding of the Add operation from
// the collection.
myOperationBindingCollection.Remove(myOperationBinding);
Console.WriteLine("\nRemoved the OperationBinding of the " +
   "Add operation from the collection.");
' Get the OperationBinding of the Add operation from the collection.
Dim myOperationBinding As OperationBinding = _
   myOperationBindingCollection(3)

' Remove the OperationBinding of the 'Add' operation from
' the collection.
myOperationBindingCollection.Remove(myOperationBinding)
Console.WriteLine(ControlChars.NewLine & _
   "Removed the OperationBinding of the " & _
   "Add operation from the collection.")

Remarques

Cette méthode effectue une recherche linéaire ; par conséquent, le temps d’exécution moyen est proportionnel à Count.

Éléments qui suivent le déplacement supprimé OperationBinding pour occuper la place libérée.

S’applique à