OperationBindingCollection.Remove(OperationBinding) 方法   
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从 OperationBinding 中移除指定的 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 -> unitPublic Sub Remove (bindingOperation As OperationBinding)参数
- bindingOperation
- OperationBinding
要从该集合中移除的 OperationBinding。
示例
下面的示例演示 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.")
注解
此方法执行线性搜索;因此,平均执行时间是 Count成正比的。
删除 OperationBinding 后的元素向上移动以占用空置的位置。