CheckedListBox.CheckedItemCollection.IndexOf(Object) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳已勾選項目集合的索引。
public:
virtual int IndexOf(System::Object ^ item);
public int IndexOf(object item);
public int IndexOf(object? item);
abstract member IndexOf : obj -> int
override this.IndexOf : obj -> int
Public Function IndexOf (item As Object) As Integer
參數
- item
- Object
你想要取得索引的物件。 此物件必須屬於已檢查項目集合。
傳回
在檢查項目集合中物件的索引,或 -1 如果物件不在集合中。 更多資訊請參閱課程概述中的範例 CheckedListBox.CheckedItemCollection 。
實作
備註
集合 CheckedItems 是集合中 Items 物件的子集,僅代表被檢查的項目。 本集合依升序排列。