Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ParallelEnumerable.Repeat<TResult> Method (TResult, Int32)

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Generates a parallel sequence that contains one repeated value.

Namespace:   System.Linq
Assembly:  System.Core (in System.Core.dll)

public static ParallelQuery<TResult> Repeat<TResult>(
	TResult element,
	int count


Type: TResult

The value to be repeated.

Type: System.Int32

The number of times to repeat the value in the generated sequence.

Return Value

Type: System.Linq.ParallelQuery<TResult>

A sequence that contains a repeated value.

Type Parameters


The type of the value to be repeated in the result sequence.

Exception Condition

count is less than 0.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
© 2017 Microsoft