Represents the collection of selected items in the ListBox.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The class stores the selected items in the ListBox. The items stored in the are items contained within the ListBox.ObjectCollection class. The ListBox.ObjectCollection class stores all items displayed in the ListBox.
Selection state within the ListBox
Based on the ListBox.ObjectCollection demonstrated in the previous table, the following table demonstrates how the would appear.
Selected item from ObjectCollection
You can use the properties and methods of this class to perform a variety of tasks with the collection. The Contains method enables you to determine whether an item from the ListBox.ObjectCollection class is a member of the . Once you know that the item is located within the collection, you can use the IndexOf method to determine where a specific item within the ListBox.ObjectCollection for the ListBox is stored within the .
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.