This documentation is archived and is not being maintained.

ListBox.Sort Method

Sorts the items in the ListBox alphabetically.

[Visual Basic]
Protected Overridable Sub Sort()
protected virtual void Sort();
protected: virtual void Sort();
protected function Sort();


Notes to Inheritors:  You can override this method in your derived class to provide your own sorting routine. When adding items to a ListBox, it is more efficient to sort the items first and then add new 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 | Sorted