DataGridViewComboBoxCell.ObjectCollection.Item[Int32] DataGridViewComboBoxCell.ObjectCollection.Item[Int32] DataGridViewComboBoxCell.ObjectCollection.Item[Int32] DataGridViewComboBoxCell.ObjectCollection.Item[Int32] Property

定義

取得或設定位於目前索引位置的項目。Gets or sets the item at the current index location. 在 C# 中,這個屬性是 DataGridViewComboBoxCell.ObjectCollection 類別的索引子。In C#, this property is the indexer for the DataGridViewComboBoxCell.ObjectCollection class.

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 Int32 Int32 Int32

要取得或設定之以零為起始的項目索引。The zero-based index of the element to get or set.

屬性值

指定索引處所儲存的 ObjectThe Object stored at the given index.

實作

例外狀況

index 小於 0 或大於集合中的項目數減一。index is less than 0 or greater than the number of items in the collection minus one.

設定這個屬性時所指定的值是 nullThe specified value when setting this property is null.

在設定這個屬性時,儲存格的 DataSource 屬性值並非 nullWhen setting this property, the cell's DataSource property value is not null.

在設定這個屬性時,儲存格位於共用資料列中。When setting this property, the cell is in a shared row.

適用於

另請參閱