ProfileSettingsCollection.RemoveAt(Int32) Método
Definição
Remove um objeto ProfileSettings no local do índice especificado da coleção.Removes a ProfileSettings object at the specified index location from the collection.
public:
void RemoveAt(int index);
public void RemoveAt (int index);
member this.RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)
Parâmetros
- index
- Int32
O índice de um objeto ProfileSettings na coleção.The index of a ProfileSettings object in the collection.
Exceções
Não há nenhum objeto ProfileSettings no índice especificado na coleção, o elemento já foi removido ou a coleção é somente leitura.There is no ProfileSettings object at the specified index in the collection, the element has already been removed, or the collection is read-only.
Exemplos
O exemplo de código a seguir mostra como usar o método RemoveAt.The following code example shows how to use the RemoveAt method. Este exemplo de código faz parte de um exemplo maior fornecido para a HealthMonitoringSection classe.This code example is part of a larger example provided for the HealthMonitoringSection class.
// Remove a ProfileSettings object from the Profiles collection property.
healthMonitoringSection.Profiles.RemoveAt(0);
' Remove a ProfileSettings object from the Profiles collection property.
healthMonitoringSection.Profiles.RemoveAt(0)
Comentários
Esse método insere um remove elemento na seção apropriada do arquivo de configuração para qualquer elemento definido em um arquivo de configuração de nível superior.This method inserts a remove element into the appropriate section of the configuration file for any element defined in a higher-level configuration file. Se o elemento for definido na seção apropriada do arquivo de configuração atual, sua entrada será removida do arquivo de configuração.If the element is defined in the appropriate section of the current configuration file, its entry is removed from the configuration file. O objeto a ser removido deve existir na coleção.The object to remove must exist in the collection.