指定した OperationBinding を検索し、コレクション内で最初に見つかった位置の 0 から始まるインデックス番号を返します。
Public Function IndexOf( _
ByVal bindingOperation As OperationBinding _) As Integer
[C#]
public int IndexOf(OperationBindingbindingOperation);
[C++]
public: int IndexOf(OperationBinding* bindingOperation);
[JScript]
public function IndexOf(
bindingOperation : OperationBinding) : int;
パラメータ
- bindingOperation
コレクション内での検索対象となる OperationBinding 。
戻り値
32 ビット符号付き整数。
使用例
[Visual Basic, C#, C++] Insert メソッドを使用する例を次に示します。
' 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())
[C#]
// 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);
[C++]
// Insert the OperationBinding of the Add operation at index 0.
myOperationBindingCollection->Insert(0, addOperationBinding);
Console::WriteLine(S"\nInserted the OperationBinding of the "
S"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(S"\nThe index of the OperationBinding of the Add operation : {0}", __box(index));
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
OperationBindingCollection クラス | OperationBindingCollection メンバ | System.Web.Services.Description 名前空間