OperationCollection.Contains Method

Returns a value indicating whether the specified Operation is a member of the OperationCollection.

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

public:
bool Contains (
	Operation^ operation
)
public boolean Contains (
	Operation operation
)
public function Contains (
	operation : Operation
) : boolean
Not applicable.

Parameters

operation

The Operation for which to check collection membership.

Return Value

true if operation is a member of the OperationCollection; otherwise, false.

The following example demonstrates the use of the Contains method.

if ( myOperationCollection->Contains( myOperation ) == true )
{
   Console::WriteLine( "The index of the added 'myOperation' operation is : {0}", myOperationCollection->IndexOf( myOperation ) );
}

if (myOperationCollection.Contains(myOperation) == true) {
    Console.WriteLine("The index of the added 'myOperation' " 
        + "operation is : " 
        + myOperationCollection.IndexOf(myOperation));
}

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: