OperationCollection.Contains(Operation) メソッド

定義

指定した OperationOperationCollectionのメンバーであるかどうかを示す値を返します。

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

パラメーター

operation
Operation

コレクション メンバーシップを確認する Operation

返品

true operationOperationCollectionのメンバーである場合はfalse。それ以外の場合は。

Contains メソッドの使用例を次に示します。

if ( myOperationCollection->Contains( myOperation ))
{
   Console::WriteLine( "The index of the added 'myOperation' operation is : {0}", myOperationCollection->IndexOf( myOperation ) );
}
if (myOperationCollection.Contains(myOperation))
{
   Console.WriteLine("The index of the added 'myOperation' " +
                     "operation is : " +
                     myOperationCollection.IndexOf(myOperation));
}
If myOperationCollection.Contains(myOperation) = True Then
   Console.WriteLine("The index of the added 'myOperation' " + _
            "operation is : " + _
            myOperationCollection.IndexOf(myOperation).ToString)
End If

適用対象