DataGridViewComboBoxCell.ObjectCollection.Item[Int32] 屬性

定義

取得或設定位於目前索引位置的項目。 在 C# 中,這個屬性是 DataGridViewComboBoxCell.ObjectCollection 類別的索引子。

public:
 virtual property System::Object ^ default[int] { System::Object ^ get(int index); void set(int index, System::Object ^ value); };
public virtual object this[int index] { get; set; }
member this.Item(int) : obj with get, set
Default Public Overridable Property Item(index As Integer) As Object

參數

index
Int32

要取得或設定的以零為起始元素索引。

屬性值

Object

指定索引處所儲存的 Object

實作

例外狀況

index 小於 0 或大於集合中的項目數減一。

設定這個屬性時所指定的值是 null

在設定這個屬性時,儲存格的 DataSource 屬性值並非 null

在設定這個屬性時,儲存格位於共用資料列中。

適用於

另請參閱