ListItemCollection.IndexOf(ListItem) Método

Definição

Determina o valor de índice que representa a posição do ListItem especificado na coleção.Determines the index value that represents the position of the specified ListItem in the collection.

public:
 int IndexOf(System::Web::UI::WebControls::ListItem ^ item);
public int IndexOf (System.Web.UI.WebControls.ListItem item);
member this.IndexOf : System.Web.UI.WebControls.ListItem -> int
Public Function IndexOf (item As ListItem) As Integer

Parâmetros

item
ListItem

Um ListItem a ser pesquisado na coleção.A ListItem to search for in the collection.

Retornos

Int32

A posição de índice do ListItem especificado na coleção.The index position of the specified ListItem in the collection.

Comentários

Use o IndexOf método para determinar o valor de índice do ListItem especificado pelo item parâmetro na coleção.Use the IndexOf method to determine the index value of the ListItem specified by the item parameter in the collection. Se um item com esses critérios não for encontrado na coleção, -1 será retornado.If an item with this criteria is not found in the collection, -1 is returned.

Aplica-se a