DataGridViewCellCollection.IList.Item[Int32] Właściwość

Definicja

Pobiera lub ustawia element pod określonym indeksem.

property System::Object ^ System::Collections::IList::Item[int] { System::Object ^ get(int index); void set(int index, System::Object ^ value); };
object System.Collections.IList.Item[int index] { get; set; }
object? System.Collections.IList.Item[int index] { get; set; }
member this.System.Collections.IList.Item(int) : obj with get, set
 Property Item(index As Integer) As Object Implements IList.Item

Parametry

index
Int32

Indeks elementu do pobrania lub ustawienia.

Wartość właściwości

Element DataGridViewCell w określonym indeksie.

Implementuje

Wyjątki

Określona wartość podczas ustawiania tej właściwości nie jest wartością DataGridViewCell.

Określona wartość podczas ustawiania tej właściwości to null.

Określona komórka podczas ustawiania tej właściwości już należy do kontrolki DataGridView .

-lub-

Określona komórka podczas ustawiania tej właściwości należy już do obiektu DataGridViewRow.

index wartość jest mniejsza niż 0.

-lub-

index jest równa lub większa niż liczba komórek w kolekcji.

Uwagi

Ten element jest jawną implementacją członków. Można go używać tylko wtedy, gdy DataGridViewCellCollection wystąpienie jest rzutowe do interfejsu IList .

Dotyczy

Zobacz też