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

定义

对属性的集合进行排序。

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

具有要排序的属性的 PropertyDescriptorCollection

names
String[]

按您要属性在集合中出现的顺序排列的名称的数组。

返回

包含已排序属性的 PropertyDescriptorCollection

注解

集合中尚未包含在名称数组中的所有属性将按字母顺序添加到末尾。 names如果参数是空数组或 null,则集合中的所有属性都按字母顺序排序。

适用于

另请参阅