ListBox::SelectedIndexCollection::IList::IndexOf Method (Object^)

 

This API supports the product infrastructure and is not intended to be used directly from your code.

For a description of this member, see IList::IndexOf.

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

private:
virtual int IndexOf(
	Object^ selectedIndex
) sealed = IList::IndexOf

Parameters

selectedIndex
Type: System::Object^

The zero-based index from the ListBox::ObjectCollection to locate in this collection.

Return Value

Type: System::Int32

The zero-based index in the collection where the specified index of the ListBox::ObjectCollection is located if it is in the ListBox::SelectedIndexCollection; otherwise, -1.

This member is an explicit interface member implementation. It can be used only when the ListBox::SelectedIndexCollection instance is cast to an IList interface.

The ListBox::SelectedIndexCollection contains the indexes of selected items in the ListBox::ObjectCollection of the ListBox control.

.NET Framework
Available since 1.1
Return to top
Show: