PropertyDescriptorCollection.Sort 方法

定义

对此集合的成员进行排序。

重载

名称 说明
Sort()

使用此集合的默认排序对此集合的成员进行排序,该排序通常按字母顺序排列。

Sort(IComparer)

使用指定的 IComparer值对此集合的成员进行排序。

Sort(String[])

对此集合的成员进行排序。 首先应用指定的顺序,后跟此集合的默认排序,通常按字母顺序排列。

Sort(String[], IComparer)

对此集合的成员进行排序。 首先应用指定的顺序,然后使用指定的 IComparer排序。

Sort()

Source:
PropertyDescriptorCollection.cs
Source:
PropertyDescriptorCollection.cs
Source:
PropertyDescriptorCollection.cs
Source:
PropertyDescriptorCollection.cs
Source:
PropertyDescriptorCollection.cs

使用此集合的默认排序对此集合的成员进行排序,该排序通常按字母顺序排列。

public:
 virtual System::ComponentModel::PropertyDescriptorCollection ^ Sort();
public virtual System.ComponentModel.PropertyDescriptorCollection Sort();
abstract member Sort : unit -> System.ComponentModel.PropertyDescriptorCollection
override this.Sort : unit -> System.ComponentModel.PropertyDescriptorCollection
Public Overridable Function Sort () As PropertyDescriptorCollection

返回

包含已PropertyDescriptorCollection排序对象的新PropertyDescriptor对象。

适用于

Sort(IComparer)

Source:
PropertyDescriptorCollection.cs
Source:
PropertyDescriptorCollection.cs
Source:
PropertyDescriptorCollection.cs
Source:
PropertyDescriptorCollection.cs
Source:
PropertyDescriptorCollection.cs

使用指定的 IComparer值对此集合的成员进行排序。

public:
 virtual System::ComponentModel::PropertyDescriptorCollection ^ Sort(System::Collections::IComparer ^ comparer);
public virtual System.ComponentModel.PropertyDescriptorCollection Sort(System.Collections.IComparer? comparer);
public virtual System.ComponentModel.PropertyDescriptorCollection Sort(System.Collections.IComparer comparer);
abstract member Sort : System.Collections.IComparer -> System.ComponentModel.PropertyDescriptorCollection
override this.Sort : System.Collections.IComparer -> System.ComponentModel.PropertyDescriptorCollection
Public Overridable Function Sort (comparer As IComparer) As PropertyDescriptorCollection

参数

comparer
IComparer

用于对此集合中的对象进行排序 PropertyDescriptor 的比较器。

返回

包含已PropertyDescriptorCollection排序对象的新PropertyDescriptor对象。

另请参阅

适用于

Sort(String[])

Source:
PropertyDescriptorCollection.cs
Source:
PropertyDescriptorCollection.cs
Source:
PropertyDescriptorCollection.cs
Source:
PropertyDescriptorCollection.cs
Source:
PropertyDescriptorCollection.cs

对此集合的成员进行排序。 首先应用指定的顺序,后跟此集合的默认排序,通常按字母顺序排列。

public:
 virtual System::ComponentModel::PropertyDescriptorCollection ^ Sort(cli::array <System::String ^> ^ names);
public virtual System.ComponentModel.PropertyDescriptorCollection Sort(string[]? names);
public virtual System.ComponentModel.PropertyDescriptorCollection Sort(string[] names);
abstract member Sort : string[] -> System.ComponentModel.PropertyDescriptorCollection
override this.Sort : string[] -> System.ComponentModel.PropertyDescriptorCollection
Public Overridable Function Sort (names As String()) As PropertyDescriptorCollection

参数

names
String[]

描述此集合中对象排序 PropertyDescriptor 顺序的字符串数组。

返回

包含已PropertyDescriptorCollection排序对象的新PropertyDescriptor对象。

示例

下面的代码示例定义方法的 Sort 排序顺序。 PropertyDescriptorCollection如果包含四个具有名称、PropertyDescriptorAB属性的CD个对象,则按顺序myNewCollDB、和顺序对属性A进行C排序。

array<String^>^ temp0 = {"D","B"};
myNewColl = this->Sort( temp0 );
myNewColl = Sort(["D", "B"]);
myNewColl = Me.Sort(New String() {"D", "B"})

另请参阅

适用于

Sort(String[], IComparer)

Source:
PropertyDescriptorCollection.cs
Source:
PropertyDescriptorCollection.cs
Source:
PropertyDescriptorCollection.cs
Source:
PropertyDescriptorCollection.cs
Source:
PropertyDescriptorCollection.cs

对此集合的成员进行排序。 首先应用指定的顺序,然后使用指定的 IComparer排序。

public:
 virtual System::ComponentModel::PropertyDescriptorCollection ^ Sort(cli::array <System::String ^> ^ names, System::Collections::IComparer ^ comparer);
public virtual System.ComponentModel.PropertyDescriptorCollection Sort(string[]? names, System.Collections.IComparer? comparer);
public virtual System.ComponentModel.PropertyDescriptorCollection Sort(string[] names, System.Collections.IComparer comparer);
abstract member Sort : string[] * System.Collections.IComparer -> System.ComponentModel.PropertyDescriptorCollection
override this.Sort : string[] * System.Collections.IComparer -> System.ComponentModel.PropertyDescriptorCollection
Public Overridable Function Sort (names As String(), comparer As IComparer) As PropertyDescriptorCollection

参数

names
String[]

描述此集合中对象排序 PropertyDescriptor 顺序的字符串数组。

comparer
IComparer

用于对此集合中的对象进行排序 PropertyDescriptor 的比较器。

返回

包含已PropertyDescriptorCollection排序对象的新PropertyDescriptor对象。

示例

下面的代码示例定义方法的 Sort 排序顺序。 PropertyDescriptorCollection如果包含四个具有名称、PropertyDescriptorAB属性的CD个对象,则按顺序myNewCollDB、和顺序对属性A进行C排序。

array<String^>^ temp0 = {"D","B"};
myNewColl = this->Sort( temp0 );
myNewColl = Sort(["D", "B"]);
myNewColl = Me.Sort(New String() {"D", "B"})

另请参阅

适用于