EnumerableRowCollectionExtensions.ThenBy Método
Definição
Realiza uma classificação secundária das linhas de uma EnumerableRowCollection em ordem crescente.Performs a secondary ordering of the rows of a EnumerableRowCollection in ascending order.
Sobrecargas
| ThenBy<TRow,TKey>(OrderedEnumerableRowCollection<TRow>, Func<TRow,TKey>) |
Esta API dá suporte à infraestrutura do produto e não deve ser usada diretamente do seu código. Realiza uma classificação secundária das linhas de uma EnumerableRowCollection em ordem crescente de acordo com a chave especificada.Performs a secondary ordering of the rows of a EnumerableRowCollection in ascending order according to the specified key. |
| ThenBy<TRow,TKey>(OrderedEnumerableRowCollection<TRow>, Func<TRow,TKey>, IComparer<TKey>) |
Esta API dá suporte à infraestrutura do produto e não deve ser usada diretamente do seu código. Realiza uma classificação secundária das linhas de uma EnumerableRowCollection em ordem crescente de acordo com a chave e o comparador especificados.Performs a secondary ordering of the rows of a EnumerableRowCollection in ascending order according to the specified key and comparer. |
ThenBy<TRow,TKey>(OrderedEnumerableRowCollection<TRow>, Func<TRow,TKey>)
Realiza uma classificação secundária das linhas de uma EnumerableRowCollection em ordem crescente de acordo com a chave especificada.Performs a secondary ordering of the rows of a EnumerableRowCollection in ascending order according to the specified key.
Esta API dá suporte à infraestrutura do produto e não deve ser usada diretamente do seu código.
public:
generic <typename TRow, typename TKey>
[System::Runtime::CompilerServices::Extension]
static System::Data::OrderedEnumerableRowCollection<TRow> ^ ThenBy(System::Data::OrderedEnumerableRowCollection<TRow> ^ source, Func<TRow, TKey> ^ keySelector);
public static System.Data.OrderedEnumerableRowCollection<TRow> ThenBy<TRow,TKey> (this System.Data.OrderedEnumerableRowCollection<TRow> source, Func<TRow,TKey> keySelector);
static member ThenBy : System.Data.OrderedEnumerableRowCollection<'Row> * Func<'Row, 'Key> -> System.Data.OrderedEnumerableRowCollection<'Row>
<Extension()>
Public Function ThenBy(Of TRow, TKey) (source As OrderedEnumerableRowCollection(Of TRow), keySelector As Func(Of TRow, TKey)) As OrderedEnumerableRowCollection(Of TRow)
Parâmetros de tipo
- TRow
O tipo dos elementos de linha em source , normalmente DataRow .The type of the row elements in source, typically DataRow.
- TKey
O tipo da chave retornada por keySelector.The type of the key returned by keySelector.
Parâmetros
Uma EnumerableRowCollection contendo os elementos DataRow a serem ordenados.An EnumerableRowCollection containing the DataRow elements to be ordered.
- keySelector
- Func<TRow,TKey>
Uma função para extrair uma chave de um elemento.A function to extract a key from an element.
Retornos
Uma OrderedEnumerableRowCollection<TRow> cujos elementos são classificados pela chave especificada.An OrderedEnumerableRowCollection<TRow> whose elements are sorted by the specified key.
Comentários
O uso de uma ThenBy operação requer uma operação de classificação primária existente usando OrderBy .The use of a ThenBy operation requires an existing primary sorting operation using OrderBy.
Esse método é implementado usando a execução adiada.This method is implemented by using deferred execution. O valor de retorno imediato é um objeto que armazena todas as informações necessárias para executar a ação.The immediate return value is an object that stores all the information that is required to perform the action. A consulta representada por esse método não é executada até que o objeto seja enumerado chamando o GetEnumerator método diretamente ou usando o foreach no Visual C# ou For Each no Visual Basic.The query represented by this method is not executed until the object is enumerated either by calling its GetEnumerator method directly or by using foreach in Visual C# or For Each in Visual Basic.
Confira também
- Select<TRow,S>(EnumerableRowCollection<TRow>, Func<TRow,S>)
- OrderBy
- ThenBy<TSource,TKey>(IOrderedEnumerable<TSource>, Func<TSource,TKey>)
Aplica-se a
ThenBy<TRow,TKey>(OrderedEnumerableRowCollection<TRow>, Func<TRow,TKey>, IComparer<TKey>)
Realiza uma classificação secundária das linhas de uma EnumerableRowCollection em ordem crescente de acordo com a chave e o comparador especificados.Performs a secondary ordering of the rows of a EnumerableRowCollection in ascending order according to the specified key and comparer.
Esta API dá suporte à infraestrutura do produto e não deve ser usada diretamente do seu código.
public:
generic <typename TRow, typename TKey>
[System::Runtime::CompilerServices::Extension]
static System::Data::OrderedEnumerableRowCollection<TRow> ^ ThenBy(System::Data::OrderedEnumerableRowCollection<TRow> ^ source, Func<TRow, TKey> ^ keySelector, System::Collections::Generic::IComparer<TKey> ^ comparer);
public static System.Data.OrderedEnumerableRowCollection<TRow> ThenBy<TRow,TKey> (this System.Data.OrderedEnumerableRowCollection<TRow> source, Func<TRow,TKey> keySelector, System.Collections.Generic.IComparer<TKey> comparer);
static member ThenBy : System.Data.OrderedEnumerableRowCollection<'Row> * Func<'Row, 'Key> * System.Collections.Generic.IComparer<'Key> -> System.Data.OrderedEnumerableRowCollection<'Row>
<Extension()>
Public Function ThenBy(Of TRow, TKey) (source As OrderedEnumerableRowCollection(Of TRow), keySelector As Func(Of TRow, TKey), comparer As IComparer(Of TKey)) As OrderedEnumerableRowCollection(Of TRow)
Parâmetros de tipo
- TRow
O tipo dos elementos de linha em source , normalmente DataRow .The type of the row elements in source, typically DataRow.
- TKey
O tipo da chave retornada por keySelector.The type of the key returned by keySelector.
Parâmetros
Uma EnumerableRowCollection contendo os elementos DataRow a serem ordenados.An EnumerableRowCollection containing the DataRow elements to be ordered.
- keySelector
- Func<TRow,TKey>
Uma função para extrair uma chave de um elemento.A function to extract a key from an element.
- comparer
- IComparer<TKey>
Um IComparer<T> para comparar chaves.An IComparer<T> to compare keys.
Retornos
Uma OrderedEnumerableRowCollection<TRow> cujos elementos são classificados pela chave e o comparador especificados.An OrderedEnumerableRowCollection<TRow> whose elements are sorted by the specified key and comparer.
Comentários
O uso de uma ThenBy operação requer uma operação de classificação primária existente usando OrderBy .The use of a ThenBy operation requires an existing primary sorting operation using OrderBy.
Esse método é implementado usando a execução adiada.This method is implemented by using deferred execution. O valor de retorno imediato é um objeto que armazena todas as informações necessárias para executar a ação.The immediate return value is an object that stores all the information that is required to perform the action. A consulta representada por esse método não é executada até que o objeto seja enumerado chamando o GetEnumerator método diretamente ou usando o foreach no Visual C# ou For Each no Visual Basic.The query represented by this method is not executed until the object is enumerated either by calling its GetEnumerator method directly or by using foreach in Visual C# or For Each in Visual Basic.
Confira também
- Select<TRow,S>(EnumerableRowCollection<TRow>, Func<TRow,S>)
- OrderBy
- ThenBy<TSource,TKey>(IOrderedEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)