Share via


OperationBindingCollection.Add(OperationBinding) 方法

定义

将指定的 OperationBinding 添加到 OperationBindingCollection 的结尾。

public:
 int Add(System::Web::Services::Description::OperationBinding ^ bindingOperation);
public int Add (System.Web.Services.Description.OperationBinding bindingOperation);
member this.Add : System.Web.Services.Description.OperationBinding -> int
Public Function Add (bindingOperation As OperationBinding) As Integer

参数

bindingOperation
OperationBinding

要添加到集合中的 OperationBinding

返回

添加了 bindingOperation 参数的位置的从零开始的索引。

示例

下面的示例演示 Add 方法的用法。

// Add the Add OperationBinding to the collection.
myOperationBindingCollection->Add( addOperationBinding );
Console::WriteLine( "\nAdded the OperationBinding of the Add"
" operation to the collection." );
// Add the Add OperationBinding to the collection.
myOperationBindingCollection.Add(addOperationBinding);
Console.WriteLine("\nAdded the OperationBinding of the Add" +
   " operation to the collection.");
' Add the Add OperationBinding to the collection.
myOperationBindingCollection.Add(addOperationBinding)
Console.WriteLine(ControlChars.NewLine & _
   "Added the OperationBinding of the Add " & _
   "operation to the collection.")

适用于