语言

ListViewGroupCollection.IndexOf(ListViewGroup) 方法

定义

返回集合中指定的索引 ListViewGroup 。

public:
 int IndexOf(System::Windows::Forms::ListViewGroup ^ value);
public int IndexOf(System.Windows.Forms.ListViewGroup value);
member this.IndexOf : System.Windows.Forms.ListViewGroup -> int
Public Function IndexOf (value As ListViewGroup) As Integer

参数

value
ListViewGroup

在 ListViewGroup 集合中查找的项。

返回

集合中组的从零开始的索引,或者如果组不在集合中,则 -1。

注解

使用此方法确定集合中组的索引。 例如,使用方法返回IEnumerator的循环访问集合GetEnumerator时,这非常有用,以确定每个组的索引。

适用于

另请参阅