Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Contains Method

ComboBox.ObjectCollection.Contains Method

Determines if the specified item is located within the collection.

[Visual Basic]
Public Overridable Function Contains( _
   ByVal value As Object _
) As Boolean Implements IList.Contains
public virtual bool Contains(
 object value
public: virtual bool Contains(
 Object* value
public function Contains(
   value : Object
) : Boolean;


An object representing the item to locate in the collection.

Return Value

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.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

ComboBox.ObjectCollection Class | ComboBox.ObjectCollection Members | System.Windows.Forms Namespace

© 2015 Microsoft