Collection.IList.RemoveAt(Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
Collection删除指定索引处的对象项。
virtual void IListRemoveAt(int index) = System::Collections::IList::RemoveAt;
void IList.RemoveAt(int index);
abstract member IListRemoveAt : int -> unit
override this.IListRemoveAt : int -> unit
Sub IListRemoveAt (index As Integer) Implements IList.RemoveAt
参数
- index
- Int32
要移除的项的从零开始的索引。
例外
index 不是对象中的 Collection 有效索引。
注解
在连续元素(如列表)的集合中,已删除元素后面的元素向上移动以占据空置的位置。 如果为集合编制索引,则移动的元素的索引也会更新。 此行为不适用于在概念上将元素分组到存储桶中的集合,例如哈希表。