語言

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遍歷集合時,這對於判斷每個群組的索引非常有用。

適用於

另請參閱