ListBox::SelectedIndexCollection::Contains Method (Int32)
.NET Framework (current version)
Determines whether the specified index is located within the collection.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- selectedIndex
-
Type:
System::Int32
The index to locate in the collection.
Return Value
Type: System::Booleantrue if the specified index from the ListBox::ObjectCollection for the ListBox is an item in this collection; otherwise, false.
The Contains method enables you to determine whether an index position from the ListBox::ObjectCollection class is a member of the selected indexes stored in the ListBox::SelectedIndexCollection. You can use this to determine whether a specific item in a multiple-selection ListBox is selected.
.NET Framework
Available since 1.1
Available since 1.1
Show: