OperationCollection.IndexOf(Operation) メソッド

定義

指定した Operation を検索し、コレクション内で最初に見つかった位置の 0 から始まるインデックスを返します。

public:
 int IndexOf(System::Web::Services::Description::Operation ^ operation);
public int IndexOf(System.Web.Services.Description.Operation operation);
member this.IndexOf : System.Web.Services.Description.Operation -> int
Public Function IndexOf (operation As Operation) As Integer

パラメーター

operation
Operation

コレクション内で検索する Operation

返品

32 ビット符号付き整数。

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

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

適用対象