TypeConverter.SortProperties(PropertyDescriptorCollection, String[]) 方法

定义

对属性的集合进行排序。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

参数

props
PropertyDescriptorCollection

具有要排序的属性的 PropertyDescriptorCollectionA 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.

返回

包含已排序属性的 PropertyDescriptorCollectionA 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. 如果参数是空数组或null, 则集合中的所有属性都按字母顺序排序。 namesIf the names parameter is an empty array or null, all the properties in the collection are sorted alphabetically.

适用于

另请参阅