次の方法で共有


OperationBindingCollection.IndexOf(OperationBinding) メソッド

定義

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

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

パラメーター

bindingOperation
OperationBinding

コレクション内での検索対象となる OperationBinding

戻り値

Int32

32 ビット符号付き整数。

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

// Insert the OperationBinding of the Add operation at index 0.
myOperationBindingCollection->Insert( 0, addOperationBinding );
Console::WriteLine( "\nInserted the OperationBinding of the "
"Add operation in the collection." );

// Get the index of the OperationBinding of the Add
// operation from the collection.
int index = myOperationBindingCollection->IndexOf( addOperationBinding );
Console::WriteLine( "\nThe index of the OperationBinding of the Add operation : {0}", index );
// Insert the OperationBinding of the Add operation at index 0.
myOperationBindingCollection.Insert(0, addOperationBinding);
Console.WriteLine("\nInserted the OperationBinding of the " +
   "Add operation in the collection.");

// Get the index of the OperationBinding of the Add
// operation from the collection.
int index = myOperationBindingCollection.IndexOf(addOperationBinding);
Console.WriteLine("\nThe index of the OperationBinding of the " +
   "Add operation : " + index);
' Insert the OperationBinding of the Add operation at index 0.
myOperationBindingCollection.Insert(0, addOperationBinding)
Console.WriteLine(ControlChars.NewLine & _
   "Inserted the OperationBinding of the " & _
   "Add operation in the collection.")

' Get the index of the OperationBinding of the Add
' operation from the collection.
Dim index As Integer = myOperationBindingCollection.IndexOf( _
   addOperationBinding)
Console.WriteLine(ControlChars.NewLine & _
   "The index of the OperationBinding of the " & _
   "Add operation : " & index.ToString())

適用対象