This documentation is archived and is not being maintained.

ListBox.CreateItemCollection Method

Creates a new instance of the item collection.

[Visual Basic]
Protected Overridable Function CreateItemCollection() As _
protected virtual ObjectCollection CreateItemCollection();
protected: virtual ObjectCollection* CreateItemCollection();
protected function CreateItemCollection() : ObjectCollection;

Return Value

A ListBox.ObjectCollection that represents the new item collection.


Notes to Inheritors:  You can override this in your derived classes to provide a different collection to store your items.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ListBox Class | ListBox Members | System.Windows.Forms Namespace | ListBox.ObjectCollection