ListBox.SelectedIndexCollection.IList.Contains(Object) 方法

定義

如需這個成員的說明,請參閱 Contains(Object)

 virtual bool System.Collections.IList.Contains(System::Object ^ selectedIndex) = System::Collections::IList::Contains;
bool IList.Contains (object selectedIndex);
bool IList.Contains (object? selectedIndex);
abstract member System.Collections.IList.Contains : obj -> bool
override this.System.Collections.IList.Contains : obj -> bool
Function Contains (selectedIndex As Object) As Boolean Implements IList.Contains

參數

selectedIndex
Object

要放置在集合中的索引。

傳回

如果 ListBox.ObjectCollectionListBox 中的指定索引為這個集合中的項目,則為 true,否則為 false

實作

備註

這個成員是明確介面成員實作, 只有在 ListBox.SelectedIndexCollection 執行個體轉換成 IList 介面時,才能使用這個成員。

方法 IList.Contains 可讓您判斷是否來自 ListBox.ObjectCollection 儲存在 中之所選索引成員的 ListBox.SelectedIndexCollection 索引位置。 您可以使用這個方法來判斷是否選取多重選取清單方塊中的特定專案。

適用於

另請參閱