Partitioner<TSource>.GetPartitions(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Partitions the underlying collection into the given number of partitions.
public:
abstract System::Collections::Generic::IList<System::Collections::Generic::IEnumerator<TSource> ^> ^ GetPartitions(int partitionCount);
public abstract System.Collections.Generic.IList<System.Collections.Generic.IEnumerator<TSource>> GetPartitions (int partitionCount);
abstract member GetPartitions : int -> System.Collections.Generic.IList<System.Collections.Generic.IEnumerator<'Source>>
Public MustOverride Function GetPartitions (partitionCount As Integer) As IList(Of IEnumerator(Of TSource))
Parameters
- partitionCount
- Int32
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.