This documentation is archived and is not being maintained.

CheckedListBox.CheckedItemCollection.IndexOf Method

Returns an index into the collection of checked items.

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

public int IndexOf (
	Object item
public final int IndexOf (
	Object item
public final function IndexOf (
	item : Object
) : int
Not applicable.



The object whose index you want to retrieve. This object must belong to the checked items collection.

Return Value

The index of the object in the checked item collection or -1 if the object is not in the collection. For more information, see the examples in the CheckedListBox.CheckedItemCollection class overview.

The CheckedItems collection is a subset of the objects in the Items collection, representing only items that are checked. This collection is ordered in ascending order.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0