OperationBindingCollection.IndexOf(OperationBinding) Method

Definition

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

C#
public int IndexOf(System.Web.Services.Description.OperationBinding bindingOperation);

Parameters

bindingOperation
OperationBinding

The OperationBinding for which to search in the collection.

Returns

A 32-bit signed integer.

Examples

The following example demonstrates the use of the Insert method.

C#
// Insert the OperationBinding of the Add operation at index 0.
myOperationBindingCollection.Insert(0, addOperationBinding);
Console.WriteLine("\nInserted the OperationBinding of the " +
   "Add operation in the collection.");

// Get the index of the OperationBinding of the Add
// operation from the collection.
int index = myOperationBindingCollection.IndexOf(addOperationBinding);
Console.WriteLine("\nThe index of the OperationBinding of the " +
   "Add operation : " + index);

Applies to

Proizvod Verzije
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)