Allows an intermediate query to be treated as if no ordering is implied among the elements.
Assemblies: System.Linq.Parallel (in System.Linq.Parallel.dll)
System.Core (in System.Core.dll)
static member AsUnordered : source:ParallelQuery<'TSource> -> ParallelQuery<'TSource>
The type of elements of source.
- Type: System.Linq.ParallelQuery()
The input sequence.
Return ValueType: System.Linq.ParallelQuery()
The source sequence with arbitrary order.
Usage NoteIn Visual Basic and C#, you can call this method as an instance method on any object of type ParallelQuery(). When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
source is a null reference (Nothing in Visual Basic).
AsUnordered may provide performance benefits when ordering is not required in a portion of a query. By default, PLINQ treats an input sequence as unordered unless OrderBy or AsOrdered is specified. However, if ordering was turned on and is no longer needed, then AsUnordered can be used to turn it off in mid-query, and this may result in performance benefits. The AsUnordered operator itself does not shuffle the source sequence; it simply removes the ordering requirement for subsequent operators. If the source is ordered, subsequent operators might keep that ordering if it is more efficient to do so. AsUnordered can be called anywhere in the query; it does not need to be called immediately after AsParallel. For more information, see Understanding Speedup in PLINQ and Order Preservation in PLINQ.
Windows Phone 8.1, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.