ListView::ListViewItemCollection::IList::Insert Method (Int32, Object^)
.NET Framework (current version)
This API supports the product infrastructure and is not intended to be used directly from your code.
Inserts an object 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::Object^
The object that represents the item to insert.
Implements
IList::Insert(Int32, Object^)| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | The index parameter is less than 0 or greater than the value of the Count property of the ListView::ListViewItemCollection. |
The item parameter can be any type. If item is a ListViewItem, it is added to the ListView::ListViewItemCollection. If item is another type, a new ListViewItem is created containing the string from the ToString method of item.
.NET Framework
Available since 1.1
Available since 1.1
Show: