Collection<T>.IList.Insert(Int32, Object) Metoda

Definicja

Wstawia element do IList określonego indeksu.

 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

Parametry

index
Int32

Liczony od elementu zerowego indeks, w którym powinien zostać wstawiony parametr value.

value
Object

Element Object do wstawienia do .IList

Implementuje

Wyjątki

index nie jest prawidłowym indeksem w pliku IList.

value jest typem, który nie można przypisać do klasy IList.

Uwagi

Jeśli index wartość jest równa liczbie elementów w elemecie IList, value zostanie ona dołączona do końca.

Ta metoda jest operacją O(n), gdzie n to Count.

Dotyczy