ListViewItem.ListViewSubItemCollection.RemoveAt 方法

移除集合中指定索引处的子项。

**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)

语法

声明
Public Sub RemoveAt ( _
    index As Integer _
)
用法
Dim instance As ListViewSubItemCollection
Dim index As Integer

instance.RemoveAt(index)
public void RemoveAt (
    int index
)
public:
virtual void RemoveAt (
    int index
) sealed
public final void RemoveAt (
    int index
)
public final function RemoveAt (
    index : int
)

参数

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

异常

异常类型 条件

ArgumentOutOfRangeException

index 参数小于零或大于等于 ListViewItem.ListViewSubItemCollectionCount 属性的值。

备注

当从集合中移除一个子项时,集合中后面的子项的索引将更改。有关已移除子项的所有信息都被删除。您可以使用此方法通过指定要从集合中移除的子项的索引来从该集合中移除特定子项。要指定要移除的子项而不是该子项的索引,请使用 Remove 方法。若要从集合中移除所有子项,请使用 Clear 方法。

平台

Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

.NET Compact Framework

受以下版本支持:2.0、1.0

请参见

参考

ListViewItem.ListViewSubItemCollection 类
ListViewItem.ListViewSubItemCollection 成员
System.Windows.Forms 命名空间
Remove
Clear