ListBox.IntegerCollection.IndexOf(Int32) 方法

定義

取得指定整數中 的 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 方法。

適用於