TypeConverter.SortProperties(PropertyDescriptorCollection, String[]) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
整理一組屬性。
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
參數
PropertyDescriptorCollection A 具有排序屬性。
- names
- String[]
一個名稱陣列,依照你希望屬性出現在集合中的順序排列。
傳回
PropertyDescriptorCollection A 包含排序後的屬性。
備註
集合中所有未包含在名稱陣列中的屬性會依字母順序加入到最後。 若 names 參數為空陣列或 null,集合中所有屬性皆依字母順序排序。