OperationMessageCollection.IndexOf(OperationMessage) Method
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 OperationMessage and returns the zero-based index of the first occurrence within the collection.
public:
int IndexOf(System::Web::Services::Description::OperationMessage ^ operationMessage);
public int IndexOf(System.Web.Services.Description.OperationMessage operationMessage);
member this.IndexOf : System.Web.Services.Description.OperationMessage -> int
Public Function IndexOf (operationMessage As OperationMessage) As Integer
- operationMessage
- OperationMessage
The OperationMessage for which to search in the collection.
The zero-based index of the specified operation message, or -1 if the element was not found in the collection.
if ( myOperationMessageCollection->Contains( myOperationMessage ))
{
int myIndex = myOperationMessageCollection->IndexOf( myOperationMessage );
Console::WriteLine( " The index of the Add operation message in the collection is : {0}", myIndex );
}
if(myOperationMessageCollection.Contains(myOperationMessage))
{
int myIndex =
myOperationMessageCollection.IndexOf(myOperationMessage);
Console.WriteLine(" The index of the Add operation " +
"message in the collection is : " + myIndex);
}
If myOperationMessageCollection.Contains(myOperationMessage) _
= True Then
Dim myIndex As Integer = _
myOperationMessageCollection.IndexOf(myOperationMessage)
Console.WriteLine(" The index of the Add operation " & _
"message in the collection is : " & myIndex.ToString())
End If
Prodotto | Versioni |
---|---|
.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) |
Feedback su .NET
.NET è un progetto open source. Seleziona un collegamento per fornire feedback: