แก้ไข

แชร์ผ่าน


Partitioner<TSource>.GetPartitions(Int32) Method

Definition

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

IList<IEnumerator<TSource>>

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.

Applies to

See also