PropertyDescriptorCollection.Sort Método

Definição

Classifica os membros desta coleção.Sorts the members of this collection.

Sobrecargas

Sort()

Classifica os membros desta coleção usando a classificação padrão desta coleção, que, geralmente, é em ordem alfabética.Sorts the members of this collection, using the default sort for this collection, which is usually alphabetical.

Sort(IComparer)

Classifica os membros desta coleção usando o IComparer especificado.Sorts the members of this collection, using the specified IComparer.

Sort(String[])

Classifica os membros desta coleção.Sorts the members of this collection. A ordem especificada é aplicada primeiro, seguida pela classificação padrão para esta coleção, que é geralmente em ordem alfabética.The specified order is applied first, followed by the default sort for this collection, which is usually alphabetical.

Sort(String[], IComparer)

Classifica os membros desta coleção.Sorts the members of this collection. A ordem especificada é aplicada primeiro, seguida pela classificação usando o IComparer especificado.The specified order is applied first, followed by the sort using the specified IComparer.

Sort()

Classifica os membros desta coleção usando a classificação padrão desta coleção, que, geralmente, é em ordem alfabética.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

Retornos

PropertyDescriptorCollection

Uma nova PropertyDescriptorCollection que contém os objetos PropertyDescriptor classificados.A new PropertyDescriptorCollection that contains the sorted PropertyDescriptor objects.

Aplica-se a

Sort(IComparer)

Classifica os membros desta coleção usando o IComparer especificado.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);
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

Parâmetros

comparer
IComparer

Um comparador a ser usado para classificar objetos PropertyDescriptor nesta coleção.A comparer to use to sort the PropertyDescriptor objects in this collection.

Retornos

PropertyDescriptorCollection

Uma nova PropertyDescriptorCollection que contém os objetos PropertyDescriptor classificados.A new PropertyDescriptorCollection that contains the sorted PropertyDescriptor objects.

Confira também

Aplica-se a

Sort(String[])

Classifica os membros desta coleção.Sorts the members of this collection. A ordem especificada é aplicada primeiro, seguida pela classificação padrão para esta coleção, que é geralmente em ordem alfabética.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);
abstract member Sort : string[] -> System.ComponentModel.PropertyDescriptorCollection
override this.Sort : string[] -> System.ComponentModel.PropertyDescriptorCollection
Public Overridable Function Sort (names As String()) As PropertyDescriptorCollection

Parâmetros

names
String[]

Uma matriz de cadeias de caracteres que descreve a ordem de classificação dos objetos PropertyDescriptor nesta coleção.An array of strings describing the order in which to sort the PropertyDescriptor objects in this collection.

Retornos

PropertyDescriptorCollection

Uma nova PropertyDescriptorCollection que contém os objetos PropertyDescriptor classificados.A new PropertyDescriptorCollection that contains the sorted PropertyDescriptor objects.

Exemplos

O exemplo de código a seguir define a ordem de classificação para o Sort método.The following code example defines the sort order for the Sort method. Se o PropertyDescriptorCollection contiver quatro PropertyDescriptor objetos com os nomes A ,, B C e D , as propriedades de myNewColl serão classificadas na ordem D , B , A e C .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"})

Confira também

Aplica-se a

Sort(String[], IComparer)

Classifica os membros desta coleção.Sorts the members of this collection. A ordem especificada é aplicada primeiro, seguida pela classificação usando o IComparer especificado.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);
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

Parâmetros

names
String[]

Uma matriz de cadeias de caracteres que descreve a ordem de classificação dos objetos PropertyDescriptor nesta coleção.An array of strings describing the order in which to sort the PropertyDescriptor objects in this collection.

comparer
IComparer

Um comparador a ser usado para classificar objetos PropertyDescriptor nesta coleção.A comparer to use to sort the PropertyDescriptor objects in this collection.

Retornos

PropertyDescriptorCollection

Uma nova PropertyDescriptorCollection que contém os objetos PropertyDescriptor classificados.A new PropertyDescriptorCollection that contains the sorted PropertyDescriptor objects.

Exemplos

O exemplo de código a seguir define a ordem de classificação para o Sort método.The following code example defines the sort order for the Sort method. Se o PropertyDescriptorCollection contiver quatro PropertyDescriptor objetos com os nomes A ,, B C e D , as propriedades de myNewColl serão classificadas na ordem D , B , A e C .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"})

Confira também

Aplica-se a