ListView.SelectedIndexCollection.IList.Insert(Int32, Object) 方法

定義

在指定的索引位置,插入項目至集合之中。

 virtual void System.Collections.IList.Insert(int index, System::Object ^ value) = System::Collections::IList::Insert;
void IList.Insert (int index, object value);
void IList.Insert (int index, object? value);
abstract member System.Collections.IList.Insert : int * obj -> unit
override this.System.Collections.IList.Insert : int * obj -> unit
Sub Insert (index As Integer, value As Object) Implements IList.Insert

參數

index
Int32

應在 value 插入以零為起始的索引。

value
Object

要插入 ListView.SelectedIndexCollection 中的物件。

實作

例外狀況

一律擲回。

備註

您無法直接變更 ListView.SelectedIndexCollection 類別。 若要將 的 ListViewItem 索引加入 至 ListView.SelectedIndexCollection ,請使用 Selected 屬性。

適用於