ListViewItem.ListViewSubItemCollection.Insert 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在指定的索引處插入子項目到集合中。
public:
void Insert(int index, System::Windows::Forms::ListViewItem::ListViewSubItem ^ item);
public void Insert(int index, System.Windows.Forms.ListViewItem.ListViewSubItem item);
member this.Insert : int * System.Windows.Forms.ListViewItem.ListViewSubItem -> unit
Public Sub Insert (index As Integer, item As ListViewItem.ListViewSubItem)
參數
- index
- Int32
項目插入的零基索引位置。
A ListViewItem.ListViewSubItem 代表要插入到集合中的子項目。
例外狀況
參數index小於零或大於 的Count性質值ListViewItem.ListViewSubItemCollection。
備註
此方法允許您在 中 ListViewItem.ListViewSubItemCollection特定位置插入子項目。 若要新增子項目而不指定特定位置,請使用該 Add 方法。 如果你想在集合中加入子項目陣列,請使用這個 AddRange 方法。 如果你想在現有的子項目集合中插入新的子項目,可以使用這個方法。