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.")

适用于