Compartilhar via


OperationMessageCollection.Remove(OperationMessage) Método

Definição

Remove a primeira ocorrência do OperationMessage especificado do OperationMessageCollection.

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

Parâmetros

operationMessage
OperationMessage

O OperationMessage a ser removido da coleção.

Exemplos

myOperationMessageCollection->Remove( myInputOperationMessage );

// Display Flow, Input, and Output after removing.
DisplayFlowInputOutput( myOperationMessageCollection, "Remove" );

// Insert the message at index 0 in the collection.
myOperationMessageCollection->Insert( 0, myInputOperationMessage );

// Display Flow, Input, and Output after inserting.
DisplayFlowInputOutput( myOperationMessageCollection, "Insert" );
myOperationMessageCollection.Remove(myInputOperationMessage);

// Display Flow, Input, and Output after removing.
DisplayFlowInputOutput(myOperationMessageCollection, "Remove");

// Insert the message at index 0 in the collection.
myOperationMessageCollection.Insert(0, myInputOperationMessage);

// Display Flow, Input, and Output after inserting.
DisplayFlowInputOutput(myOperationMessageCollection, "Insert");
myOperationMessageCollection.Remove(myInputOperationMessage)

' Display Flow, Input, and Output after removing.
DisplayFlowInputOutput(myOperationMessageCollection, "Remove")

' Insert the message at index 0 in the collection.
myOperationMessageCollection.Insert(0, myInputOperationMessage)

' Display Flow, Input, and Output after inserting.
DisplayFlowInputOutput(myOperationMessageCollection, "Insert")

Comentários

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

Os elementos que seguem a movimentação removida OperationMessage para cima para ocupar o local desocupado.

Aplica-se a