OperationCollection.Remove(Operation) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Supprime la première occurrence du .OperationOperationCollection
public:
void Remove(System::Web::Services::Description::Operation ^ operation);
public void Remove(System.Web.Services.Description.Operation operation);
member this.Remove : System.Web.Services.Description.Operation -> unit
Public Sub Remove (operation As Operation)
Paramètres
Exemples
L'exemple suivant illustre l'utilisation de la méthode Remove.
myOperationCollection->Remove( myOperation );
// Insert the 'myOpearation' operation at the index '0'.
myOperationCollection->Insert( 0, myOperation );
Console::WriteLine( "The operation at index '0' is : {0}", myOperationCollection[ 0 ]->Name );
myOperationCollection.Remove(myOperation);
// Insert the 'myOpearation' operation at the index '0'.
myOperationCollection.Insert(0, myOperation);
Console.WriteLine("The operation at index '0' is : " +
myOperationCollection[0].Name);
myOperationCollection.Remove(myOperation)
' Insert the 'myOpearation' operation at the index '0'.
myOperationCollection.Insert(0, myOperation)
Console.WriteLine("The operation at index '0' is : " + _
myOperationCollection.Item(0).Name)
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é Operation jusqu’à occuper l’emplacement libéré.