ListViewItem::ListViewSubItemCollection::Insert Method (Int32, ListViewItem::ListViewSubItem^)
.NET Framework (current version)
Inserts a subitem into the collection at the specified index.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- index
-
Type:
System::Int32
The zero-based index location where the item is inserted.
- item
-
Type:
System.Windows.Forms::ListViewItem::ListViewSubItem^
A ListViewItem::ListViewSubItem representing the subitem to insert into the collection.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | The index parameter is less than zero or greater than the value of the Count property of the ListViewItem::ListViewSubItemCollection. |
This method allows you to insert a subitem at a specific position in the ListViewItem::ListViewSubItemCollection. To add a subitem without specifying a specific position, use the Add method. If you want to add an array of subitems to the collection, use the AddRange method. You can use this method if you want to insert a new subitem into an existing collection of subitems.
.NET Framework
Available since 1.1
Available since 1.1
Show: