편집

다음을 통해 공유


ListView.CheckedIndexCollection.IndexOf(Int32) Method

Definition

Returns the index within the ListView.CheckedIndexCollection of the specified index from the ListView.ListViewItemCollection of the list view control.

public:
 int IndexOf(int checkedIndex);
public int IndexOf (int checkedIndex);
member this.IndexOf : int -> int
Public Function IndexOf (checkedIndex As Integer) As Integer

Parameters

checkedIndex
Int32

The zero-based index from the ListView.ListViewItemCollection to locate in the collection.

Returns

The zero-based index in the collection where the specified index of the ListView.ListViewItemCollection is located within the ListView.CheckedIndexCollection; otherwise, -1 if the index is not located in the collection.

Remarks

Once you know that an item is in the checked index collection (using the Contains method), you can use the IndexOf method to determine the position of the index in the ListView.CheckedIndexCollection.

Applies to

See also