c#查找列表指定元素的索引
Given a Collection<T> of Integer and we have to insert an element at given index.
给定Integer的Collection <T>,我们必须在给定的索引处插入一个元素。
To insert an element in Collection<T>, we use Insert() method, it accepts two parameters index and item, where index is an integer type and item is of T type i.e. the type of the Collection<T>.
要在Collection <T>中插入元素,我们使用Insert()方法 ,它接受两个参数index和item ,其中index是整数类型,而item是T类型,即Collection <T>的类型。
Syntax:
句法:
public void Insert (int index, T item);
Note: Insert() method may return e