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

返回

Boolean

如果 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())

适用于