TypeConverter.SortProperties(PropertyDescriptorCollection, String[]) Method

Definition

Sorts a collection of properties.

protected:
 System::ComponentModel::PropertyDescriptorCollection ^ SortProperties(System::ComponentModel::PropertyDescriptorCollection ^ props, cli::array <System::String ^> ^ names);
protected System.ComponentModel.PropertyDescriptorCollection SortProperties (System.ComponentModel.PropertyDescriptorCollection props, string[] names);
member this.SortProperties : System.ComponentModel.PropertyDescriptorCollection * string[] -> System.ComponentModel.PropertyDescriptorCollection
Protected Function SortProperties (props As PropertyDescriptorCollection, names As String()) As PropertyDescriptorCollection

Parameters

props
PropertyDescriptorCollection

A PropertyDescriptorCollection that has the properties to sort.

names
String[]

An array of names in the order you want the properties to appear in the collection.

Returns

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 null, all the properties in the collection are sorted alphabetically.

Applies to

See also