ProfileSettingsCollection.IndexOf(String) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Devolve o índice do objeto especificado ProfileSettings .
public:
int IndexOf(System::String ^ name);
public int IndexOf(string name);
member this.IndexOf : string -> int
Public Function IndexOf (name As String) As Integer
Parâmetros
- name
- String
O nome de um ProfileSettings objeto na coleção.
Devoluções
O índice do objeto especificado ProfileSettings , ou -1 se o objeto não for encontrado na coleção.
Exemplos
O exemplo de código a seguir mostra como usar o IndexOf método. Este exemplo de código faz parte de um exemplo maior fornecido para a HealthMonitoringSection classe.
// Get the index of the 'Default' ProfileSettings in the Profiles collection property.
Console.WriteLine("Profiles index for 'Default': {0}.",
healthMonitoringSection.Profiles.IndexOf("Default"));
' Get the index of the 'Default' ProfileSettings in the Profiles collection property.
Console.WriteLine("Profiles index for 'Default': {0}.", _
healthMonitoringSection.Profiles.IndexOf("Default"))