通过


EventDescriptorCollection.Sort 方法

定义

对此 EventDescriptorCollection成员进行排序。

重载

名称 说明
Sort(String[], IComparer)

根据指定的排序顺序和一个IComparer排序顺序,对此EventDescriptorCollection成员进行排序。

Sort(String[])

根据指定的排序顺序对此 EventDescriptorCollection成员进行排序。

Sort()

使用此集合的默认排序(通常按字母顺序)对成员 EventDescriptorCollection进行排序。

Sort(IComparer)

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

Sort(String[], IComparer)

Source:
EventDescriptorCollection.cs
Source:
EventDescriptorCollection.cs
Source:
EventDescriptorCollection.cs
Source:
EventDescriptorCollection.cs
Source:
EventDescriptorCollection.cs

根据指定的排序顺序和一个IComparer排序顺序,对此EventDescriptorCollection成员进行排序。

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

参数

names
String[]

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

comparer
IComparer

用于对此集合中的对象进行排序EventDescriptor的一个IComparer

返回

新的 EventDescriptorCollection

示例

下面的代码示例定义方法的 Sort 排序顺序。 EventDescriptorCollection如果包含四个具有名称、BCD属性的AEventDescriptor个对象,则按顺序BDA、和顺序对属性myNewColl进行C排序。

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

注解

首先应用指定的排序顺序,然后使用指定的 IComparer排序。

注释

HostProtectionAttribute应用于此类的属性具有以下Resources属性值: SynchronizationHostProtectionAttribute 不会影响桌面应用程序(通常通过双击图标、键入命令或在浏览器中输入 URL 来启动)。 有关详细信息,请参阅 HostProtectionAttribute 类或 SQL Server 编程和主机保护属性

另请参阅

适用于

Sort(String[])

Source:
EventDescriptorCollection.cs
Source:
EventDescriptorCollection.cs
Source:
EventDescriptorCollection.cs
Source:
EventDescriptorCollection.cs
Source:
EventDescriptorCollection.cs

根据指定的排序顺序对此 EventDescriptorCollection成员进行排序。

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

参数

names
String[]

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

返回

新的 EventDescriptorCollection

示例

下面的代码示例定义方法的 Sort 排序顺序。 EventDescriptorCollection如果包含四个具有名称、BCD属性的AEventDescriptor个对象,则按顺序BDA、和顺序对属性myNewColl进行C排序。

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

注解

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

注释

HostProtectionAttribute应用于此类的属性具有以下Resources属性值: SynchronizationHostProtectionAttribute 不会影响桌面应用程序(通常通过双击图标、键入命令或在浏览器中输入 URL 来启动)。 有关详细信息,请参阅 HostProtectionAttribute 类或 SQL Server 编程和主机保护属性

另请参阅

适用于

Sort()

Source:
EventDescriptorCollection.cs
Source:
EventDescriptorCollection.cs
Source:
EventDescriptorCollection.cs
Source:
EventDescriptorCollection.cs
Source:
EventDescriptorCollection.cs

使用此集合的默认排序(通常按字母顺序)对成员 EventDescriptorCollection进行排序。

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

返回

新的 EventDescriptorCollection

示例

下面的代码示例定义方法的 Sort 排序顺序。 EventDescriptorCollection如果包含四个具有名称、BCD属性的AEventDescriptor个对象,则按顺序BDA、和顺序对属性myNewColl进行C排序。

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

注解

注释

HostProtectionAttribute应用于此类的属性具有以下Resources属性值: SynchronizationHostProtectionAttribute 不会影响桌面应用程序(通常通过双击图标、键入命令或在浏览器中输入 URL 来启动)。 有关详细信息,请参阅 HostProtectionAttribute 类或 SQL Server 编程和主机保护属性

适用于

Sort(IComparer)

Source:
EventDescriptorCollection.cs
Source:
EventDescriptorCollection.cs
Source:
EventDescriptorCollection.cs
Source:
EventDescriptorCollection.cs
Source:
EventDescriptorCollection.cs

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

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

参数

comparer
IComparer

用于对此集合中的对象进行排序EventDescriptor的一个IComparer

返回

新的 EventDescriptorCollection

示例

下面的代码示例定义方法的 Sort 排序顺序。 EventDescriptorCollection如果包含四个具有名称、BCD属性的AEventDescriptor个对象,则按顺序BDA、和顺序对属性myNewColl进行C排序。

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

注解

首先应用指定的 IComparer 值,后跟此集合的默认排序,该排序通常按字母顺序排列。

注释

HostProtectionAttribute应用于此类的属性具有以下Resources属性值: SynchronizationHostProtectionAttribute 不会影响桌面应用程序(通常通过双击图标、键入命令或在浏览器中输入 URL 来启动)。 有关详细信息,请参阅 HostProtectionAttribute 类或 SQL Server 编程和主机保护属性

另请参阅

适用于