语言

ItemCollection.RemoveAt(Int32) 方法

定义

删除集合或视图的指定索引处的项。

public:
 virtual void RemoveAt(int removeIndex);
public void RemoveAt(int removeIndex);
abstract member RemoveAt : int -> unit
override this.RemoveAt : int -> unit
Public Sub RemoveAt (removeIndex As Integer)

参数

removeIndex
Int32

要移除的项的从零开始的索引。

实现

例外

只读 ItemCollection ,因为它处于 ItemsSource 模式,或者 DeferRefresh 是否有效。

索引范围不足。

注解

从集合中删除项时,任何索引值较高的剩余项随着集合大小折叠而递减其索引。

适用于