OperationBindingCollection.Remove(OperationBinding) Metod

Definition

Tar bort den första förekomsten av angiven OperationBinding från OperationBindingCollection.

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

Parametrar

bindingOperation
OperationBinding

Att OperationBinding ta bort från samlingen.

Exempel

I följande exempel visas användningen av metoden Remove.

// Get the OperationBinding of the Add operation from the collection.
OperationBinding^ myOperationBinding = myOperationBindingCollection[ 3 ];

// Remove the OperationBinding of the Add operation from
// the collection.
myOperationBindingCollection->Remove( myOperationBinding );
Console::WriteLine( "\nRemoved the OperationBinding of the "
"Add operation from the collection." );
// Get the OperationBinding of the Add operation from the collection.
OperationBinding myOperationBinding =
   myOperationBindingCollection[3];

// Remove the OperationBinding of the Add operation from
// the collection.
myOperationBindingCollection.Remove(myOperationBinding);
Console.WriteLine("\nRemoved the OperationBinding of the " +
   "Add operation from the collection.");
' Get the OperationBinding of the Add operation from the collection.
Dim myOperationBinding As OperationBinding = _
   myOperationBindingCollection(3)

' Remove the OperationBinding of the 'Add' operation from
' the collection.
myOperationBindingCollection.Remove(myOperationBinding)
Console.WriteLine(ControlChars.NewLine & _
   "Removed the OperationBinding of the " & _
   "Add operation from the collection.")

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 OperationBinding flyttningen upp för att uppta den tömda platsen.

Gäller för