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

Definición

Inserta un elemento en en el 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

Índice de base cero en el que value se debe insertar.

value
Object

que Object se va a insertar en .IList

Implementaciones

Excepciones

indexno es un índice válido en .IList

valuees de un tipo que no se puede asignar a .IList

Comentarios

Si index es igual al número de elementos de IList, value se anexa al final.

Este método es una operación O(n), donde n es Count.

Se aplica a