OperationMessageCollection.Remove(OperationMessage) Metoda

Definicja

Usuwa pierwsze wystąpienie określonego OperationMessage elementu z elementu 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)

Parametry

operationMessage
OperationMessage

Element OperationMessage do usunięcia z kolekcji.

Przykłady

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

Uwagi

Ta metoda wykonuje wyszukiwanie liniowe; w związku z tym średni czas wykonywania jest proporcjonalny do Count.

Elementy, które następują po usunięciu OperationMessage , przenoszą się w górę, aby zajmować opuszczone miejsce.

Dotyczy