OperationMessageCollection.Remove(OperationMessage) Método

Definición

Quita la primera aparición del especificado OperationMessage de .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

que OperationMessage se va a quitar de la colección.

Ejemplos

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")

Comentarios

Este método realiza una búsqueda lineal; por lo tanto, el tiempo medio de ejecución es proporcional a Count.

Los elementos que siguen al removido OperationMessage se mueven hacia arriba para ocupar el lugar desocupado.

Se aplica a