OperationMessageCollection.Remove(OperationMessage) Methode

Definitie

Hiermee verwijdert u het eerste exemplaar van de opgegeven OperationMessage instantie uit 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)

Parameters

operationMessage
OperationMessage

De OperationMessage te verwijderen uit de verzameling.

Voorbeelden

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

Opmerkingen

Met deze methode wordt een lineaire zoekopdracht uitgevoerd; daarom is de gemiddelde uitvoeringstijd evenredig met Count.

De elementen die volgen op de verwijderde OperationMessage verplaatsing omhoog om de onbezette plek te bezetten.

Van toepassing op