WebBaseEventCollection.IndexOf(WebBaseEvent) Método
Definição
Obtém o índice do objeto WebBaseEvent especificado.Gets the index of the specified WebBaseEvent object.
public:
int IndexOf(System::Web::Management::WebBaseEvent ^ value);
public int IndexOf (System.Web.Management.WebBaseEvent value);
member this.IndexOf : System.Web.Management.WebBaseEvent -> int
Public Function IndexOf (value As WebBaseEvent) As Integer
Parâmetros
- value
- WebBaseEvent
O objeto WebBaseEvent para o qual o índice deve ser obtido.The WebBaseEvent object for which to obtain the index.
Retornos
O índice do objeto WebBaseEvent especificado na coleção.The index of the specified WebBaseEvent object within the collection.
Exceções
O objeto não está na coleção.The object is not in the collection.
Exemplos
O exemplo de código a seguir mostra como usar a IndexOf propriedade.The following code example shows how to use the IndexOf property.
// Get the index of the specified event.
public static int GetIndexOf(WebBaseEvent ev)
{
return events.IndexOf(ev);
}
' Get the index of the specified event.
Public Shared Function GetIndexOf(ByVal ev _
As WebBaseEvent) As Integer
Return events.IndexOf(ev)
End Function 'GetIndexOf