語言

DataGridViewComboBoxCell.ObjectCollection.IndexOf(Object) 方法

定義

回傳集合中指定項目的索引。

public:
 virtual int IndexOf(System::Object ^ value);
public int IndexOf(object value);
public int IndexOf(object? value);
abstract member IndexOf : obj -> int
override this.IndexOf : obj -> int
Public Function IndexOf (value As Object) As Integer

參數

value
Object

一個代表要在集合中找到的物品的物件。

傳回

若參數在集合中,則為該參數的 value 零基索引;否則為 -1。

實作

例外狀況

value 是 null。

適用於

另請參閱