Bewerken

Delen via


ListBox.SelectedIndexCollection.IList.IndexOf(Object) Method

Definition

For a description of this member, see IndexOf(Object).

 virtual int System.Collections.IList.IndexOf(System::Object ^ selectedIndex) = System::Collections::IList::IndexOf;
int IList.IndexOf (object selectedIndex);
int IList.IndexOf (object? selectedIndex);
abstract member System.Collections.IList.IndexOf : obj -> int
override this.System.Collections.IList.IndexOf : obj -> int
Function IndexOf (selectedIndex As Object) As Integer Implements IList.IndexOf

Parameters

selectedIndex
Object

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

Returns

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.

Implements

Remarks

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.

Applies to

See also