語言

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; }
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 會儲存在給定的索引上。

實作

例外狀況

index 小於 0 或大於收藏中項目數減去 1。

設定此屬性時指定的值為 null。

設定此屬性時,該格子的 DataSource 屬性值不 null為 。

設定此屬性時,該儲存格位於共用列中。

適用於

另請參閱