Collection<T>.IList.Insert(Int32, Object) 方法
定义
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
参数
- index
- Int32
应插入 value 的从零开始的索引。The zero-based index at which value should be inserted.
实现
例外
注解
如果 index 等于 IList 中的项数,则将 value 追加到末尾。If index equals the number of items in the IList, then value is appended to the end.
此方法是 O (n) 操作,其中 n 是 Count 。This method is an O(n) operation, where n is Count.