Collection<T>.IList.Insert(Int32, Object) Método

Definição

Insere um item no IList índice especificado.

 virtual void System.Collections.IList.Insert(int index, System::Object ^ value) = System::Collections::IList::Insert;
void IList.Insert(int index, object value);
abstract member System.Collections.IList.Insert : int * obj -> unit
override this.System.Collections.IList.Insert : int * obj -> unit
Sub Insert (index As Integer, value As Object) Implements IList.Insert

Parâmetros

index
Int32

O índice baseado em zero no qual value deve ser inserido.

value
Object

O Object para inserir no IList.

Implementações

Exceções

index não é um índice válido no IList.

value é de um tipo que não é atribuível ao IList.

Observações

Se index for igual ao número de itens no IList, então value é acrescentado ao fim.

Este método é uma operação O(n), onde n é Count.

Aplica-se a