Editar

Compartir vía


ListView.ListViewItemCollection.Remove(ListViewItem) Method

Definition

Removes the specified item from the collection.

public:
 virtual void Remove(System::Windows::Forms::ListViewItem ^ item);
public virtual void Remove (System.Windows.Forms.ListViewItem item);
abstract member Remove : System.Windows.Forms.ListViewItem -> unit
override this.Remove : System.Windows.Forms.ListViewItem -> unit
Public Overridable Sub Remove (item As ListViewItem)

Parameters

item
ListViewItem

A ListViewItem representing the item to remove from the collection.

Exceptions

The ListViewItem assigned to the item parameter is null.

Remarks

When you remove an item from the collection, the indexes change for subsequent items in the collection. All information about the removed item is deleted. You can use this method to remove a specific item from the collection by specifying the actual item to remove. To specify the index of the item to remove instead of the item itself, use the RemoveAt method. To remove all items from the collection, use the Clear method.

Applies to

See also