次の方法で共有


OperationMessageCollection.Contains(OperationMessage) メソッド

定義

指定した OperationMessageOperationMessageCollection のメンバーかどうかを確認します。

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

パラメーター

operationMessage
OperationMessage

コレクション メンバーシップを確認する対象の OperationMessage

戻り値

Boolean

operationMessage パラメーターが OperationMessageCollection のメンバーである場合は true。それ以外の場合は false

if ( myOperationMessageCollection->Contains( myOperationMessage ) == true )
{
   int myIndex = myOperationMessageCollection->IndexOf( myOperationMessage );
   Console::WriteLine( " The index of the Add operation message in the collection is : {0}", myIndex );
}
if(myOperationMessageCollection.Contains(myOperationMessage)
   == true )
{
   int myIndex =
      myOperationMessageCollection.IndexOf(myOperationMessage);
   Console.WriteLine(" The index of the Add operation " +
      "message in the collection is : " + myIndex);
}
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

適用対象