OperationCollection::IndexOf Method (Operation^)

 

Searches for the specified Operation and returns the zero-based index of the first occurrence within the collection.

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

public:
int IndexOf(
	Operation^ operation
)

Parameters

operation
Type: System.Web.Services.Description::Operation^

The Operation for which to search in the collection.

Return Value

Type: System::Int32

A 32-bit signed integer.

The following example demonstrates the use of the IndexOf method.

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

.NET Framework
Available since 1.1
Return to top
Show: