ListView.ListViewItemCollection.IList.Item[Int32] 屬性

定義

取得或設定集合內位於指定索引處的 ListViewItem

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; }
member this.System.Collections.IList.Item(int) : obj with get, set
 Property Item(index As Integer) As Object Implements IList.Item

參數

index
Int32

要取得之項目的以零為起始的索引。

屬性值

Object

ListViewItem,表示集合中位於指定索引處的項目。

實作

例外狀況

索引參數小於 0,或者大於等於 CountListView.ListViewItemCollection 屬性值。

備註

參數 item 可以設定為任何類型。 如果 itemListViewItem ,則會將 它新增至 ListView.ListViewItemCollection 。 如果 item 是另一種類型,則會建立新的 ListViewItem ,其中包含 的 方法 item 中的 ToString 字串。

適用於