指定した OperationMessage を検索し、コレクション内で最初に見つかった位置の 0 から始まるインデックス番号を返します。
Public Function IndexOf( _
ByVal operationMessage As OperationMessage _) As Integer
[C#]
public int IndexOf(OperationMessageoperationMessage);
[C++]
public: int IndexOf(OperationMessage* operationMessage);
[JScript]
public function IndexOf(
operationMessage : OperationMessage) : int;
パラメータ
- operationMessage
コレクション内での検索対象となる OperationMessage 。
戻り値
32 ビット符号付き整数。
使用例
If myOperationMessageCollection.Contains(myOperationMessage) _
= True Then
Dim myIndex As Integer = _
myOperationMessageCollection.IndexOf(myOperationMessage)
Console.WriteLine(" The index of the Add operation " & _
"message in the collection is : " & myIndex.ToString())
End If
[C#]
if(myOperationMessageCollection.Contains(myOperationMessage)
== true )
{
int myIndex =
myOperationMessageCollection.IndexOf(myOperationMessage);
Console.WriteLine(" The index of the Add operation " +
"message in the collection is : " + myIndex);
}
[C++]
if(myOperationMessageCollection->Contains(myOperationMessage)
== true )
{
int myIndex =
myOperationMessageCollection->IndexOf(myOperationMessage);
Console::WriteLine(S" The index of the Add operation message in the collection is : {0}", __box(myIndex));
}
[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 ファミリ
参照
OperationMessageCollection クラス | OperationMessageCollection メンバ | System.Web.Services.Description 名前空間