ListBox::SelectedObjectCollection::Contains Method (Object^)
.NET Framework (current version)
Determines whether the specified item is located within the collection.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- selectedObject
-
Type:
System::Object^
An object representing the item to locate in the collection.
Return Value
Type: System::Booleantrue if the specified item is located in the collection; otherwise, false.
Implements
IList::Contains(Object^)The Contains method enables you to determine whether an item from the ListBox::ObjectCollection class is a member of the selected items stored in the ListBox::SelectedObjectCollection. You can use this to determine if a specific item in a multiple-selection ListBox is selected.
.NET Framework
Available since 1.1
Available since 1.1
Show: