ערוך

שתף באמצעות


OperationCollection.Remove(Operation) Method

Definition

Removes the first occurrence of the specified Operation from the OperationCollection.

public:
 void Remove(System::Web::Services::Description::Operation ^ operation);
public void Remove (System.Web.Services.Description.Operation operation);
member this.Remove : System.Web.Services.Description.Operation -> unit
Public Sub Remove (operation As Operation)

Parameters

operation
Operation

The Operation to remove from the collection.

Examples

The following example demonstrates the use of the Remove method.

myOperationCollection->Remove( myOperation );

// Insert the 'myOpearation' operation at the index '0'.
myOperationCollection->Insert( 0, myOperation );
Console::WriteLine( "The operation at index '0' is : {0}", myOperationCollection[ 0 ]->Name );
myOperationCollection.Remove(myOperation);
// Insert the 'myOpearation' operation at the index '0'.
myOperationCollection.Insert(0, myOperation);
Console.WriteLine("The operation at index '0' is : " +
                  myOperationCollection[0].Name);
myOperationCollection.Remove(myOperation)
' Insert the 'myOpearation' operation at the index '0'.
myOperationCollection.Insert(0, myOperation)
Console.WriteLine("The operation at index '0' is : " + _
                  myOperationCollection.Item(0).Name)

Remarks

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

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

Applies to