Compartilhar via


OperationCollection.Remove(Operation) Método

Definição

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

O Operation a ser removido da coleção.

Exemplos

O exemplo a seguir demonstra o uso do método 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)

Comentários

Esse método executa uma pesquisa linear; portanto, o tempo médio de execução é proporcional a Count.

Os elementos que seguem o movimento removido Operation se movem para cima para ocupar o local desocupado.

Aplica-se a