ListViewGroupCollection.IndexOf(ListViewGroup) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳集合中指定的 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遍歷集合時,這對於判斷每個群組的索引非常有用。