This documentation is archived and is not being maintained.

TypeConverter.SortProperties Method

Sorts a collection of properties.

[Visual Basic]
Protected Function SortProperties( _
   ByVal props As PropertyDescriptorCollection, _
   ByVal names() As String _
) As PropertyDescriptorCollection
protected PropertyDescriptorCollection SortProperties(
 PropertyDescriptorCollection props,
 string[] names
protected: PropertyDescriptorCollection* SortProperties(
 PropertyDescriptorCollection* props,
 String* names __gc[]
protected function SortProperties(
   props : PropertyDescriptorCollection,
 names : String[]
) : PropertyDescriptorCollection;


A PropertyDescriptorCollection that has the properties to sort.
An array of names in the order you want the properties to appear in the collection.

Return Value

A PropertyDescriptorCollection that contains the sorted properties.


All properties in the collection that are not already in the array of names are added alphabetically to the end. If the names parameter is an empty array or a null reference (Nothing in Visual Basic), all the properties in the collection are sorted alphabetically.


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

TypeConverter Class | TypeConverter Members | System.ComponentModel Namespace | PropertyDescriptorCollection | TypeConverter