ListView.CheckedIndexCollection.IndexOf(Int32) 메서드

정의

list view 컨트롤의 ListView.CheckedIndexCollection에서 지정한 인덱스의 ListView.ListViewItemCollection 내의 인덱스를 반환합니다.

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

매개 변수

checkedIndex
Int32

컬렉션에서 찾을 ListView.ListViewItemCollection의 인덱스(0부터 시작)입니다.

반환

Int32

ListView.ListViewItemCollection의 지정된 인덱스가 ListView.CheckedIndexCollection 내에 있으면 해당 컬렉션의 인덱스(0부터 시작)이고, 그렇지 않으면 -1입니다.

설명

항목이 선택된 인덱스 컬렉션에 있다는 것을 알게 되면(메서드 사용 Contains ) 메서드를 사용하여 IndexOf 인덱 ListView.CheckedIndexCollection스의 위치를 확인할 수 있습니다.

적용 대상

추가 정보