OperationCollection.Remove(Operation) Metod

Definition

Tar bort den första förekomsten av angiven Operation från 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)

Parametrar

operation
Operation

Att Operation ta bort från samlingen.

Exempel

I följande exempel visas användningen av metoden 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)

Kommentarer

Den här metoden utför en linjär sökning. Därför är den genomsnittliga körningstiden proportionell mot Count.

Elementen som följer den borttagna Operation flyttningen upp för att uppta den tömda platsen.

Gäller för