ListView.SelectedIndexCollection.Contains(Int32) 메서드

정의

지정된 인덱스가 컬렉션에 있는지 여부를 확인합니다.

public:
 bool Contains(int selectedIndex);
public bool Contains(int selectedIndex);
member this.Contains : int -> bool
Public Function Contains (selectedIndex As Integer) As Boolean

매개 변수

selectedIndex
Int32

컬렉션에서 찾을 인덱스입니다.

반품

true for에서 지정된 인덱스가 컬렉션의 ListView.ListViewItemCollectionListView 항목이면 이고, false그렇지 않으면 .

설명

Contains 메서드를 사용하면 인덱스 위치 ListView.ListViewItemCollection 가 에 저장된 선택한 인덱스 중 하나인지 여부를 확인할 수 있습니다 ListView.SelectedIndexCollection. 항목이 선택한 인덱스 컬렉션에 있다는 것을 알게 되면 메서드를 IndexOf 사용하여 인덱 ListView.SelectedIndexCollection스의 위치를 확인할 수 있습니다.

적용 대상

추가 정보