A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/en-us/dotnet/api/system.linq.parallelenumerable.orderby below:

ParallelEnumerable.OrderBy Method (System.Linq) | Microsoft Learn

ParallelEnumerable.OrderBy Method Definition

Sorts in parallel the elements of a sequence in ascending order.

Overloads OrderBy<TSource,TKey>(ParallelQuery<TSource>, Func<TSource,TKey>)
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Sorts in parallel the elements of a sequence in ascending order according to a key.

public:
generic <typename TSource, typename TKey>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::OrderedParallelQuery<TSource> ^ OrderBy(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, TKey> ^ keySelector);
public static System.Linq.OrderedParallelQuery<TSource> OrderBy<TSource,TKey>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,TKey> keySelector);
static member OrderBy : System.Linq.ParallelQuery<'Source> * Func<'Source, 'Key> -> System.Linq.OrderedParallelQuery<'Source>
<Extension()>
Public Function OrderBy(Of TSource, TKey) (source As ParallelQuery(Of TSource), keySelector As Func(Of TSource, TKey)) As OrderedParallelQuery(Of TSource)
Type Parameters
TSource

The type of elements of source.

TKey

The type of the key returned by keySelector.

Parameters
keySelector
Func<TSource,TKey>

A function to extract a key from an element.

Returns

An OrderedParallelQuery{TSource} whose elements are sorted according to a key.

Exceptions

source or keySelector is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

Remarks

In contrast to the sequential implementation, this is not a stable sort. To achieve a stable sort, change a query of the form: var ordered = source.Select((e,i) => new { E=e, I=i }).OrderBy((v) => v.e).ThenBy(v => v.i).Select((v) => v.e);

See also OrderBy<TSource,TKey>(ParallelQuery<TSource>, Func<TSource,TKey>, IComparer<TKey>)
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Sorts in parallel the elements of a sequence in ascending order by using a specified comparer.

public:
generic <typename TSource, typename TKey>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::OrderedParallelQuery<TSource> ^ OrderBy(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, TKey> ^ keySelector, System::Collections::Generic::IComparer<TKey> ^ comparer);
public static System.Linq.OrderedParallelQuery<TSource> OrderBy<TSource,TKey>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,TKey> keySelector, System.Collections.Generic.IComparer<TKey> comparer);
public static System.Linq.OrderedParallelQuery<TSource> OrderBy<TSource,TKey>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,TKey> keySelector, System.Collections.Generic.IComparer<TKey>? comparer);
static member OrderBy : System.Linq.ParallelQuery<'Source> * Func<'Source, 'Key> * System.Collections.Generic.IComparer<'Key> -> System.Linq.OrderedParallelQuery<'Source>
<Extension()>
Public Function OrderBy(Of TSource, TKey) (source As ParallelQuery(Of TSource), keySelector As Func(Of TSource, TKey), comparer As IComparer(Of TKey)) As OrderedParallelQuery(Of TSource)
Type Parameters
TSource

The type of elements of source.

TKey

The type of the key returned by keySelector.

Parameters
keySelector
Func<TSource,TKey>

A function to extract a key from an element.

comparer
IComparer<TKey>

An IComparer{TKey} to compare keys.

Returns

An OrderedParallelQuery{TSource} whose elements are sorted according to a key.

Exceptions

source or keySelector is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

Remarks

In contrast to the sequential implementation, this is not a stable sort. See the remarks for OrderBy for an approach to implementing a stable sort.

See also

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4