OperationMessageCollection.Contains(OperationMessage) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines whether the specified OperationMessage is a member of the OperationMessageCollection.
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
Parameters
- operationMessage
- OperationMessage
The OperationMessage for which to check collection membership.
Returns
true
if the operationMessage
parameter is a member of the OperationMessageCollection; otherwise, false
.
Examples
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