SchemaNameCollection.IList.Insert(Int32, Object) Método

Definición

Inserta un elemento en la lista en el índice especificado.

 virtual void System.Collections.IList.Insert(int index, System::Object ^ value) = System::Collections::IList::Insert;
void IList.Insert(int index, object? value);
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 se debe insertar el valor.

value
Object

Elemento que se va a insertar en la lista.

Implementaciones

Comentarios

Si index es igual al número de elementos de la lista, el valor se anexa al final.

En colecciones de elementos contiguos, como listas, los elementos que siguen al elemento quitado se mueven hacia arriba para ocupar el lugar vacío. Si la colección está indizada, también se actualizan los índices de los elementos que se mueven.

Se aplica a