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

適用於