ListView.CheckedIndexCollection.Contains(Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
确定指定的索引是否位于集合中。
public:
bool Contains(int checkedIndex);
public bool Contains(int checkedIndex);
member this.Contains : int -> bool
Public Function Contains (checkedIndex As Integer) As Boolean
参数
- checkedIndex
- Int32
在集合中查找的索引。
返回
true如果集合中指定索引ListView.ListViewItemCollectionListView是集合中的项,则为 ;否则为 false。
注解
通过该方法 Contains ,可以确定索引 ListView.ListViewItemCollection 位置是否为存储在其中检查的 ListView.CheckedIndexCollection索引之一。 知道某个项位于选中的索引集合中后,可以使用该方法 IndexOf 来确定索引在中的 ListView.CheckedIndexCollection位置。