Click or drag to resize

PartitionExtensionPartitionT, TResult Method (IEnumerableIGroupingBoolean, T, FuncIEnumerableT, IEnumerableT, TResult)

Partitions a grouping by Boolean keys into a projection of true elements and false elements, respectively.

Namespace:  MoreLinq.Extensions
Assembly:  MoreLinq (in MoreLinq.dll) Version: 3.3.1+b77df70598ab84c28cd43dcf74594024b6d575e1
Syntax
public static TResult Partition<T, TResult>(
	this IEnumerable<IGrouping<bool, T>> source,
	Func<IEnumerable<T>, IEnumerable<T>, TResult> resultSelector
)

Parameters

source
Type: System.Collections.GenericIEnumerableIGroupingBoolean, T
The source sequence.
resultSelector
Type: SystemFuncIEnumerableT, IEnumerableT, TResult
Function that projects the result from sequences of true elements and false elements, respectively, passed as arguments.

Type Parameters

T
Type of elements in source groupings.
TResult
Type of the result.

Return Value

Type: TResult
The return value from resultSelector.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableIGroupingBoolean, T. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also