ReadOnlyCollection<T>.IList<T>.Insert(Int32, T) ReadOnlyCollection<T>.IList<T>.Insert(Int32, T) ReadOnlyCollection<T>.IList<T>.Insert(Int32, T) Method

定義

將項目插入位於指定索引的 IList<T>Inserts an item to the IList<T> at the specified index. 這個實作一律會擲回 NotSupportedExceptionThis implementation always throws NotSupportedException.

 virtual void System.Collections.Generic.IList<T>.Insert(int index, T value) = System::Collections::Generic::IList<T>::Insert;
void IList<T>.Insert (int index, T value);
Sub Insert (index As Integer, value As T) Implements IList(Of T).Insert

參數

index
Int32 Int32 Int32

應在 value 插入以零為起始的索引。The zero-based index at which value should be inserted.

value
T T T

要插入 IList<T> 的物件。The object to insert into the IList<T>.

實作

例外狀況

備註

這個成員是明確介面成員實作,This member is an explicit interface member implementation. 只有在 ReadOnlyCollection<T> 執行個體轉換成 IList<T> 介面時,才能使用這個成員。It can be used only when the ReadOnlyCollection<T> instance is cast to an IList<T> interface.

適用於