ImmutableArray<T>.Sort Método

Definição

Sobrecargas

Sort()

Classifica os elementos na matriz imutável usando o comparador padrão.Sorts the elements in the immutable array using the default comparer.

Sort(IComparer<T>)

Classifica os elementos na matriz imutável usando o comparador especificado.Sorts the elements in the immutable array using the specified comparer.

Sort(Comparison<T>)

Classifica os elementos em todo a ImmutableArray<T> usando o Comparison<T> especificado.Sorts the elements in the entire ImmutableArray<T> using the specified Comparison<T>.

Sort(Int32, Int32, IComparer<T>)

Classifica os elementos especificados na matriz imutável usando o comparador especificado.Sorts the specified elements in the immutable array using the specified comparer.

Sort()

Classifica os elementos na matriz imutável usando o comparador padrão.Sorts the elements in the immutable array using the default comparer.

public:
 System::Collections::Immutable::ImmutableArray<T> Sort();
public System.Collections.Immutable.ImmutableArray<T> Sort ();
member this.Sort : unit -> System.Collections.Immutable.ImmutableArray<'T>
Public Function Sort () As ImmutableArray(Of T)

Retornos

ImmutableArray<T>

Uma nova matriz imutável que contém os itens nessa matriz, em ordem de classificação.A new immutable array that contains the items in this array, in sorted order.

Aplica-se a

Sort(IComparer<T>)

Classifica os elementos na matriz imutável usando o comparador especificado.Sorts the elements in the immutable array using the specified comparer.

public:
 System::Collections::Immutable::ImmutableArray<T> Sort(System::Collections::Generic::IComparer<T> ^ comparer);
public System.Collections.Immutable.ImmutableArray<T> Sort (System.Collections.Generic.IComparer<T> comparer);
public System.Collections.Immutable.ImmutableArray<T> Sort (System.Collections.Generic.IComparer<T>? comparer);
member this.Sort : System.Collections.Generic.IComparer<'T> -> System.Collections.Immutable.ImmutableArray<'T>
Public Function Sort (comparer As IComparer(Of T)) As ImmutableArray(Of T)

Parâmetros

comparer
IComparer<T>

A implementação a ser usada na comparação de elementos ou null para usar o comparador padrãoThe implementation to use when comparing elements, or null to use the default comparer

Retornos

ImmutableArray<T>

Uma nova matriz imutável que contém os itens nessa matriz, em ordem de classificação.A new immutable array that contains the items in this array, in sorted order.

Aplica-se a

Sort(Comparison<T>)

Classifica os elementos em todo a ImmutableArray<T> usando o Comparison<T> especificado.Sorts the elements in the entire ImmutableArray<T> using the specified Comparison<T>.

public:
 System::Collections::Immutable::ImmutableArray<T> Sort(Comparison<T> ^ comparison);
public System.Collections.Immutable.ImmutableArray<T> Sort (Comparison<T> comparison);
member this.Sort : Comparison<'T> -> System.Collections.Immutable.ImmutableArray<'T>
Public Function Sort (comparison As Comparison(Of T)) As ImmutableArray(Of T)

Parâmetros

comparison
Comparison<T>

O Comparison<T> a ser usado na comparação de elementos.The Comparison<T> to use when comparing elements.

Retornos

ImmutableArray<T>

A lista classificada.The sorted list.

Exceções

comparison é nulo.comparison is null.

Aplica-se a

Sort(Int32, Int32, IComparer<T>)

Classifica os elementos especificados na matriz imutável usando o comparador especificado.Sorts the specified elements in the immutable array using the specified comparer.

public:
 System::Collections::Immutable::ImmutableArray<T> Sort(int index, int count, System::Collections::Generic::IComparer<T> ^ comparer);
public System.Collections.Immutable.ImmutableArray<T> Sort (int index, int count, System.Collections.Generic.IComparer<T> comparer);
public System.Collections.Immutable.ImmutableArray<T> Sort (int index, int count, System.Collections.Generic.IComparer<T>? comparer);
member this.Sort : int * int * System.Collections.Generic.IComparer<'T> -> System.Collections.Immutable.ImmutableArray<'T>
Public Function Sort (index As Integer, count As Integer, comparer As IComparer(Of T)) As ImmutableArray(Of T)

Parâmetros

index
Int32

O índice do primeiro elemento a ser classificado.The index of the first element to sort.

count
Int32

O número de elementos a serem incluídos na classificação.The number of elements to include in the sort.

comparer
IComparer<T>

A implementação a ser usada na comparação de elementos ou null para usar o comparador padrãoThe implementation to use when comparing elements, or null to use the default comparer

Retornos

ImmutableArray<T>

Uma nova matriz imutável que contém os itens nessa matriz, em ordem de classificação.A new immutable array that contains the items in this array, in sorted order.

Aplica-se a