Uredi

Deli z drugimi prek


PropertyDescriptorCollection.Sort Method

Definition

Sorts the members of this collection.

Overloads

Sort()

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

Sort(IComparer)

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

Sort(String[])

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

Sort(String[], IComparer)

Sorts the members of this collection. The specified order is applied first, followed by the sort using the specified IComparer.

Sort()

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

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

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

Returns

A new PropertyDescriptorCollection that contains the sorted PropertyDescriptor objects.

Applies to

Sort(IComparer)

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

Sorts the members of this collection, using the specified 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

Parameters

comparer
IComparer

A comparer to use to sort the PropertyDescriptor objects in this collection.

Returns

A new PropertyDescriptorCollection that contains the sorted PropertyDescriptor objects.

See also

Applies to

Sort(String[])

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

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

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

Parameters

names
String[]

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

Returns

A new PropertyDescriptorCollection that contains the sorted PropertyDescriptor objects.

Examples

The following code example defines the sort order for the Sort method. If the PropertyDescriptorCollection contains four PropertyDescriptor 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"})

See also

Applies to

Sort(String[], IComparer)

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

Sorts the members of this collection. The specified order is applied first, followed by the sort using the specified 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

Parameters

names
String[]

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

comparer
IComparer

A comparer to use to sort the PropertyDescriptor objects in this collection.

Returns

A new PropertyDescriptorCollection that contains the sorted PropertyDescriptor objects.

Examples

The following code example defines the sort order for the Sort method. If the PropertyDescriptorCollection contains four PropertyDescriptor 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"})

See also

Applies to