Collection.IList.RemoveAt(Int32) Método

Definição

Remove o item de objeto Collection no índice especificado.Removes the Collection object item at the specified index.

 virtual void IListRemoveAt(int index) = System::Collections::IList::RemoveAt;
void IList.RemoveAt (int index);
abstract member IListRemoveAt : int -> unit
override this.IListRemoveAt : int -> unit
Sub IListRemoveAt (index As Integer) Implements IList.RemoveAt

Parâmetros

index
Int32

O índice com base em zero do item a ser removido.The zero-based index of the item to remove.

Exceções

index não é um índice válido no objeto Collection.index is not a valid index in the Collection object.

O objeto Collection é somente leitura.The Collection object is read-only.

- ou --or- O objeto Collection tem um tamanho fixo.The Collection object has a fixed size.

Comentários

Em coleções de elementos contíguos, como listas, os elementos que seguem o elemento removido sobem para ocupar o ponto vazio.In collections of contiguous elements, such as lists, the elements that follow the removed element move up to occupy the vacated spot. Caso a coleção seja indexada, os índices dos elementos que são movidos também são atualizados.If the collection is indexed, the indexes of the elements that are moved are also updated. Este comportamento não se aplica às coleções em que elementos sejam agrupados conceitualmente em buckets, como uma tabela de hash.This behavior does not apply to collections where elements are conceptually grouped into buckets, such as a hash table.

Aplica-se a

Confira também