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
[C#]
protected PropertyDescriptorCollection SortProperties(
 PropertyDescriptorCollection props,
 string[] names
);
[C++]
protected: PropertyDescriptorCollection* SortProperties(
 PropertyDescriptorCollection* props,
 String* names __gc[]
);
[JScript]
protected function SortProperties(
   props : PropertyDescriptorCollection,
 names : String[]
) : PropertyDescriptorCollection;

Parameters

props
A PropertyDescriptorCollection that has the properties to sort.
names
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.

Remarks

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.

Requirements

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

Show: