System.Collections.Concurrent.Partitioner<TSource>.GetPartitions Method

Partitions the underlying collection into the given number of partitions.

Syntax

public abstract IList<IEnumerator<TSource>> GetPartitions (int partitionCount)

Parameters

partitionCount
The number of partitions to create.

Returns

A list containing partitionCount enumerators.

Remarks

A class that implements this method is expected to return exactly the number of partitions that are specified in partitionCount. If a partition contains no elements, then return an empty enumerator rather than null (Nothing in Visual Basic). For more information, see Custom Partitioners for PLINQ and TPL.

Requirements

Namespace: System.Collections.Concurrent
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0