ListBox::ObjectCollection::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
- value
-
Type:
System::Object^
An object representing the item to locate in the collection.
Return Value
Type: System::Booleantrue if the item is located within the collection; otherwise, false.
Implements
IList::Contains(Object^)| Exception | Condition |
|---|---|
| ArgumentNullException | value is null. |
The Contains method enables you to determine whether an object is a member of the collection. Once you know that the item is located within the collection, you can use the IndexOf method to determine where the item is located within the collection.
.NET Framework
Available since 1.1
Available since 1.1
Show: