OperationMessageCollection::Contains Method (OperationMessage^)

 

Determines whether the specified OperationMessage is a member of the OperationMessageCollection.

Namespace:   System.Web.Services.Description
Assembly:  System.Web.Services (in System.Web.Services.dll)

public:
bool Contains(
	OperationMessage^ operationMessage
)

Parameters

operationMessage
Type: System.Web.Services.Description::OperationMessage^

The OperationMessage for which to check collection membership.

Return Value

Type: System::Boolean

true if the operationMessage parameter is a member of the OperationMessageCollection; otherwise, 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 );
}

.NET Framework
Available since 1.1
Return to top
Show: