Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Partitioner<TSource>.GetPartitions(Int32) Method

Definition

Namespace:
System.Collections.Concurrent
Assemblies:
mscorlib.dll, System.Collections.Concurrent.dll
Assemblies:
netstandard.dll, System.Collections.Concurrent.dll
Assembly:
System.Collections.Concurrent.dll
Assembly:
mscorlib.dll
Assembly:
netstandard.dll
Source:
Partitioner.cs
Source:
Partitioner.cs
Source:
Partitioner.cs
Source:
Partitioner.cs
Source:
Partitioner.cs

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

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


Feedback

Was this page helpful?