共用方式為


OperationBindingCollection.Contains(OperationBinding) 方法

定義

傳回值,指出指定的 OperationBinding 是否為 OperationBindingCollection 的成員。

public:
 bool Contains(System::Web::Services::Description::OperationBinding ^ bindingOperation);
public bool Contains (System.Web.Services.Description.OperationBinding bindingOperation);
member this.Contains : System.Web.Services.Description.OperationBinding -> bool
Public Function Contains (bindingOperation As OperationBinding) As Boolean

參數

bindingOperation
OperationBinding

OperationBinding,要為其檢查集合成員資格。

傳回

如果 bindingOperation 參數是 OperationBindingCollection 的成員,則為 true,否則為 false

範例

下列範例示範 Contains 方法的用法。

// Check for the Add OperationBinding in the collection.
bool contains = myOperationBindingCollection->Contains( addOperationBinding );
Console::WriteLine( "\nWhether the collection contains the Add OperationBinding : {0}", contains );
// Check for the Add OperationBinding in the collection.
bool contains = myOperationBindingCollection.Contains
   (addOperationBinding);
Console.WriteLine("\nWhether the collection contains the Add " +
   "OperationBinding : " + contains);
' Check for the Add OperationBinding in the collection.
Dim contains As Boolean = _
   myOperationBindingCollection.Contains(addOperationBinding)
Console.WriteLine(ControlChars.NewLine & _
   "Whether the collection contains the Add " & _
   "OperationBinding : " & contains.ToString())

適用於