OperationMessageCollection.Remove(OperationMessage) Methode

Definition

Entfernt das erste Vorkommen des angegebenen OperationMessage Aus.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)

Parameter

operationMessage
OperationMessage

The OperationMessage to remove from the collection.

Beispiele

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

Hinweise

Diese Methode führt eine lineare Suche durch; Daher ist die durchschnittliche Ausführungszeit proportional zu Count.

Die Elemente, die dem entfernten OperationMessage Element folgen, bewegen sich nach oben, um die geräumte Stelle zu belegen.

Gilt für: