Editar

Compartilhar via


OperationCollection.Contains(Operation) Method

Definition

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

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

Parameters

operation
Operation

The Operation for which to check collection membership.

Returns

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

Examples

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));
}
If myOperationCollection.Contains(myOperation) = True Then
   Console.WriteLine("The index of the added 'myOperation' " + _
            "operation is : " + _
            myOperationCollection.IndexOf(myOperation).ToString)
End If

Applies to