OperationMessageCollection.Remove(OperationMessage) Method

Definition

Removes the first occurrence of the specified OperationMessage from the OperationMessageCollection.

C#
public void Remove(System.Web.Services.Description.OperationMessage operationMessage);

Parameters

operationMessage
OperationMessage

The OperationMessage to remove from the collection.

Examples

C#
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");

Remarks

This method performs a linear search; therefore, the average execution time is proportional to Count.

The elements that follow the removed OperationMessage move up to occupy the vacated spot.

Applies to

Produkt Verzie
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)