IObjectListFieldCollection.IndexOf Método

Definição

Retorna o índice de um campo.Returns the index of a field. Esta API está obsoleta.This API is obsolete. Para saber mais sobre como desenvolver aplicativos móveis ASP.NET, veja Mobile Apps & Sites with ASP.NET (Aplicativos móveis e sites com ASP.NET).For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

Sobrecargas

IndexOf(String)

Retorna o índice de um campo.Returns the index of a field. Esta API está obsoleta.This API is obsolete. Para saber mais sobre como desenvolver aplicativos móveis ASP.NET, veja Mobile Apps & Sites with ASP.NET (Aplicativos móveis e sites com ASP.NET).For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

IndexOf(ObjectListField)

Retorna o índice de um campo.Returns the index of a field. Esta API está obsoleta.This API is obsolete. Para saber mais sobre como desenvolver aplicativos móveis ASP.NET, veja Mobile Apps & Sites with ASP.NET (Aplicativos móveis e sites com ASP.NET).For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

IndexOf(String)

Retorna o índice de um campo.Returns the index of a field. Esta API está obsoleta.This API is obsolete. Para saber mais sobre como desenvolver aplicativos móveis ASP.NET, veja Mobile Apps & Sites with ASP.NET (Aplicativos móveis e sites com ASP.NET).For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

public:
 int IndexOf(System::String ^ fieldIDOrTitle);
public int IndexOf (string fieldIDOrTitle);
abstract member IndexOf : string -> int
Public Function IndexOf (fieldIDOrTitle As String) As Integer

Parâmetros

fieldIDOrTitle
String

Uma cadeia de caracteres a comparar com a propriedade Title ou DataField.A string to compare with the Title or DataField property.

Retornos

Int32

O índice do campo especificado.The index of the specified field.

Comentários

Na segunda versão desse método, ele pesquisa um campo com a Title propriedade fieldId e retorna o primeiro campo correspondente.In the second version of this method, it searches for a field with the Title property fieldId and returns the first matching field. Se nenhuma correspondência for encontrada, ela pesquisará um campo com o DataField parâmetro da propriedade fieldID e retornará o primeiro campo correspondente.If no match is found, it searches for a field with the DataField property's fieldID parameter and returns the first matching field. Caso contrário, ele retornará -1.Otherwise, it returns -1.

Confira também

Aplica-se a

IndexOf(ObjectListField)

Retorna o índice de um campo.Returns the index of a field. Esta API está obsoleta.This API is obsolete. Para saber mais sobre como desenvolver aplicativos móveis ASP.NET, veja Mobile Apps & Sites with ASP.NET (Aplicativos móveis e sites com ASP.NET).For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

public:
 int IndexOf(System::Web::UI::MobileControls::ObjectListField ^ field);
public int IndexOf (System.Web.UI.MobileControls.ObjectListField field);
abstract member IndexOf : System.Web.UI.MobileControls.ObjectListField -> int
Public Function IndexOf (field As ObjectListField) As Integer

Parâmetros

field
ObjectListField

Um campo pelo qual pesquisar na coleção especificada.A field to search for in the specified collection.

Retornos

Int32

O índice do campo especificado.The index of the specified field.

Comentários

Na primeira versão desse método, ele retorna o índice do campo especificado.In the first version of this method, it returns the index of the specified field. Se o campo especificado não estiver na coleção, ele retornará -1 .If the specified field is not in the collection, it returns -1.

Aplica-se a