Editar

Compartilhar via


ListViewItem.ListViewSubItemCollection.Insert Method

Definition

Inserts a subitem into the collection at the specified index.

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)

Parameters

index
Int32

The zero-based index location where the item is inserted.

item
ListViewItem.ListViewSubItem

A ListViewItem.ListViewSubItem representing the subitem to insert into the collection.

Exceptions

The index parameter is less than zero or greater than the value of the Count property of the ListViewItem.ListViewSubItemCollection.

Remarks

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.

Applies to

See also