OperationCollection.IndexOf(Operation) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Searches for the specified Operation and returns the zero-based index of the first occurrence within the collection.
public:
int IndexOf(System::Web::Services::Description::Operation ^ operation);
public int IndexOf (System.Web.Services.Description.Operation operation);
member this.IndexOf : System.Web.Services.Description.Operation -> int
Public Function IndexOf (operation As Operation) As Integer
Parameters
Returns
A 32-bit signed integer.
Examples
The following example demonstrates the use of the IndexOf
method.
if ( myOperationCollection->Contains( myOperation ))
{
Console::WriteLine( "The index of the added 'myOperation' operation is : {0}", myOperationCollection->IndexOf( myOperation ) );
}
if (myOperationCollection.Contains(myOperation))
{
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
Συνεργαστείτε μαζί μας στο GitHub
Μπορείτε να βρείτε την πηγή για αυτό το περιεχόμενο στο GitHub, όπου μπορείτε επίσης να δημιουργήσετε και να εξετάσετε ζητήματα και αιτήματα έλξης. Για περισσότερες πληροφορίες, ανατρέξτε στον οδηγό συνεργατών.