語言

Collection.IList.Item[Int32] 屬性

定義

取得或設定位於指定索引處的專案。

property System::Object ^ System::Collections::IList::Item[int] { System::Object ^ get(int Index); void set(int Index, System::Object ^ value); };
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 IListItem(Index As Integer) As Object Implements IList.Item
 Property IListItem(index As Integer) As Object Implements IList.Item

參數

indexIndex
Int32

以零為基礎的索引,指要取得或設定的元素。

屬性值

位於指定索引的元素。

例外狀況

index 在物件中不是有效的索引 Collection 。

屬性已設定,物件 Collection 為唯讀。

適用於