ListBox.IntegerCollection.Contains Method (Int32)

 

Determines whether the specified integer is in the collection.

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

public bool Contains(
	int item
)

Parameters

item
Type: System.Int32

The integer to search for in the collection.

Return Value

Type: System.Boolean

true if the specified integer is in the collection; otherwise, false.

Use the Contains method to determine whether an integer is a member of the ListBox.IntegerCollection. 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 2.0
Return to top
Show: