Edit

Share via


ListViewItem.Index Property

Definition

Gets the zero-based index of the item within the ListView control.

public:
 property int Index { int get(); };
[System.ComponentModel.Browsable(false)]
public int Index { get; }
[<System.ComponentModel.Browsable(false)>]
member this.Index : int
Public ReadOnly Property Index As Integer

Property Value

The zero-based index of the item within the ListView.ListViewItemCollection of the ListView control, or -1 if the item is not associated with a ListView control.

Attributes

Remarks

You can use this property to determine if the item is associated with a ListView control as well as to determine its position within the ListView.ListViewItemCollection of the ListView.

Applies to