OperationCollection.Remove(Operation) Метод

Определение

Удаляет первое вхождение указанного объекта Operation из объекта 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)

Параметры

operation
Operation

Объект Operation, который требуется удалить из коллекции.

Примеры

В следующем примере иллюстрируется использование метода Remove.

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)

Комментарии

Этот метод выполняет линейный поиск; Таким образом, среднее время выполнения пропорционально Count.

Элементы, следующие за удаленным Operation , двигаются вверх, чтобы занять освобожденное место.

Применяется к