CheckedListBox.CheckedIndexCollection.Contains(Int32) 方法

定義

判斷指定的索引是否位於集合中。Determines whether the specified index is located in the collection.

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

參數

index
Int32

要放置在集合中的索引。The index to locate in the collection.

傳回

如果 true 中的指定索引是這個集合中的項目,則為 CheckedListBox.ObjectCollection,否則為 falsetrue if the specified index from the CheckedListBox.ObjectCollection is an item in this collection; otherwise, false.

備註

您可以使用這個方法來判斷 Items 集合中的索引是否位於 CheckedIndices 集合中。You can use this method to determine whether an index from the Items collection is in the CheckedIndices collection.

適用於