ComboBox.ObjectCollection.Contains Method (Object)

 

Determines if the specified item is located within the collection.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public bool Contains(
	object value
)

Parameters

value
Type: System.Object

An object representing the item to locate in the collection.

Return Value

Type: System.Boolean

true if the item is located within the collection; otherwise, false.

The Contains method enables you to determine if 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
Return to top
Show: