Compartir a través de


OperationMessageCollection.Remove(OperationMessage) Método

Definición

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

OperationMessage que 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 eliminado OperationMessage se mueven hacia arriba para ocupar el lugar vacío.

Se aplica a