ParallelEnumerable.Concat Method

Definition

Concatenates two parallel sequences.

Overloads

Concat<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>)
Obsolete.

This Concat overload should never be called. This method is marked as obsolete and always throws NotSupportedException when called.

Concat<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>)

Concatenates two parallel sequences.

Concat<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Caution

The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.

This Concat overload should never be called. This method is marked as obsolete and always throws NotSupportedException when called.

C#
[System.Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
public static System.Linq.ParallelQuery<TSource> Concat<TSource>(this System.Linq.ParallelQuery<TSource> first, System.Collections.Generic.IEnumerable<TSource> second);

Type Parameters

TSource

This type parameter is not used.

Parameters

first
ParallelQuery<TSource>

This parameter is not used.

second
IEnumerable<TSource>

This parameter is not used.

Returns

This overload always throws a NotSupportedException.

Attributes

Exceptions

The exception that occurs when this method is called.

Remarks

This overload exists to disallow usage of Concat with a left data source of type ParallelQuery<TSource> and a right data source of type IEnumerable<T>. Otherwise, the Concat operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation.

See also

Applies to

.NET 9 and other versions
Product Versions (Obsolete)
.NET (Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9)
.NET Framework (4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)
.NET Standard (2.0, 2.1)
UWP (10.0)

Concat<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Concatenates two parallel sequences.

C#
public static System.Linq.ParallelQuery<TSource> Concat<TSource>(this System.Linq.ParallelQuery<TSource> first, System.Linq.ParallelQuery<TSource> second);

Type Parameters

TSource

The type of the elements of the input sequences.

Parameters

first
ParallelQuery<TSource>

The first sequence to concatenate.

second
ParallelQuery<TSource>

The sequence to concatenate to the first sequence.

Returns

A sequence that contains the concatenated elements of the two input sequences.

Exceptions

first or second is a null reference (Nothing in Visual Basic).

See also

Applies to

.NET 9 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0