OperationCollection.Remove(Operation) Método

Definição

Remove a primeira ocorrência do especificado Operation do 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)

Parâmetros

operation
Operation

A Operation remover da coleção.

Exemplos

O exemplo a seguir demonstra o uso do Remove método.

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)

Observações

Este método realiza uma pesquisa linear; Portanto, o tempo médio de execução é proporcional a Count.

Os elementos que seguem ao removido Operation sobem para ocupar o local vago.

Aplica-se a