OperationCollection.Remove(Operation) Metoda

Definicja

Usuwa pierwsze wystąpienie określonego Operation elementu z .OperationCollection

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)

Parametry

operation
Operation

Element Operation do usunięcia z kolekcji.

Przykłady

W poniższym przykładzie pokazano użycie Remove metody .

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)

Uwagi

Ta metoda wykonuje wyszukiwanie liniowe; dlatego średni czas wykonywania jest proporcjonalny do Count.

Elementy, które następują po usunięciu Operation , przechodzą w górę, aby zajmować opuszczone miejsce.

Dotyczy