Editare

Partajați prin


EventDescriptorCollection.Sort Method

Definition

Sorts the members of this EventDescriptorCollection.

Overloads

Sort(String[], IComparer)

Sorts the members of this EventDescriptorCollection, given a specified sort order and an IComparer.

Sort(String[])

Sorts the members of this EventDescriptorCollection, given a specified sort order.

Sort()

Sorts the members of this EventDescriptorCollection, using the default sort for this collection, which is usually alphabetical.

Sort(IComparer)

Sorts the members of this EventDescriptorCollection, using the specified IComparer.

Sort(String[], IComparer)

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

Sorts the members of this EventDescriptorCollection, given a specified sort order and an IComparer.

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

Parameters

names
String[]

An array of strings describing the order in which to sort the EventDescriptor objects in the collection.

comparer
IComparer

An IComparer to use to sort the EventDescriptor objects in this collection.

Returns

The new EventDescriptorCollection.

Examples

The following code example defines the sort order for the Sort method. If the EventDescriptorCollection contains four EventDescriptor objects with the names A, B, C, and D, the properties of myNewColl would be sorted in the order D, B, A, and C.

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

Remarks

The specified sort order is applied first, followed by the sort using the specified IComparer.

Note

The HostProtectionAttribute attribute applied to this class has the following Resources property value: Synchronization. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.

See also

Applies to

Sort(String[])

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

Sorts the members of this EventDescriptorCollection, given a specified sort order.

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

Parameters

names
String[]

An array of strings describing the order in which to sort the EventDescriptor objects in the collection.

Returns

The new EventDescriptorCollection.

Examples

The following code example defines the sort order for the Sort method. If the EventDescriptorCollection contains four EventDescriptor objects with the names A, B, C, and D, the properties of myNewColl would be sorted in the order D, B, A, and C.

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

Remarks

The specified order is applied first, followed by the default sort for this collection, which is usually alphabetical.

Note

The HostProtectionAttribute attribute applied to this class has the following Resources property value: Synchronization. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.

See also

Applies to

Sort()

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

Sorts the members of this EventDescriptorCollection, using the default sort for this collection, which is usually alphabetical.

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

Returns

The new EventDescriptorCollection.

Examples

The following code example defines the sort order for the Sort method. If the EventDescriptorCollection contains four EventDescriptor objects with the names A, B, C, and D, the properties of myNewColl would be sorted in the order D, B, A, and C.

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

Remarks

Note

The HostProtectionAttribute attribute applied to this class has the following Resources property value: Synchronization. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.

Applies to

Sort(IComparer)

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

Sorts the members of this EventDescriptorCollection, using the specified IComparer.

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

Parameters

comparer
IComparer

An IComparer to use to sort the EventDescriptor objects in this collection.

Returns

The new EventDescriptorCollection.

Examples

The following code example defines the sort order for the Sort method. If the EventDescriptorCollection contains four EventDescriptor objects with the names A, B, C, and D, the properties of myNewColl would be sorted in the order D, B, A, and C.

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

Remarks

The specified IComparer is applied first, followed by the default sort for this collection, which is usually alphabetical.

Note

The HostProtectionAttribute attribute applied to this class has the following Resources property value: Synchronization. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.

See also

Applies to