IListContract<C>.RemoveAt(Int32) 方法
定义
移除指定索引处的元素。Removes the element at the specified index.
public:
void RemoveAt(int index);
public void RemoveAt (int index);
abstract member RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)
参数
- index
- Int32
要移除的元素的索引。The index of the element to remove.
例外
index 小于零。index is less than zero.
- 或 --or-
index 等于或大于 GetCount() 的返回值。index is equal to or greater than the return value of GetCount().
IListContract<C> 为只读。The IListContract<C> is read-only.
注解
调用后 RemoveAt ,删除的元素之后的元素会移动以占用空出的位置。After you call RemoveAt, the elements that follow the removed element move to occupy the vacated spot. 还会更新移动的元素的索引。The indexes of the elements that are moved are also updated.
若要确定是否 IListContract<C> 为只读,请调用 GetIsReadOnly 方法。To determine whether an IListContract<C> is read-only, call the GetIsReadOnly method.