Język

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

Definicja

Wstawia element do określonego indeksu IList .

 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

Indeks oparty na zerach, w którym value należy wstawić.

value
Object

Element Object do wstawienia do pliku IList.

Implementuje

Wyjątki

index nie jest prawidłowym indeksem w obiekcie IList.

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

Uwagi

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

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

Dotyczy