ListBox.IntegerCollection.IndexOf(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得指定整數中 的 ListBox.IntegerCollection 索引。
public:
int IndexOf(int item);
public int IndexOf(int item);
member this.IndexOf : int -> int
Public Function IndexOf (item As Integer) As Integer
參數
- item
- Int32
為整數,用以檢索索引。
傳回
整數 ListBox.IntegerCollection中以零為基礎的指標;否則為負一(-1)。
備註
使用此 IndexOf 方法判斷物品在收藏中的位置。 若要判斷項目是否位於集合中,請先使用此 Contains 方法。