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

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

Definition

Namespace: MoreLinq.Extensions
Assembly: MoreLinq (in MoreLinq.dll) Version: 3.4.0+b99a6a8cc504caf2d48372fe54a2f8116c59cd0c
C#
public static TResult Partition<T, TResult>(
	this IEnumerable<IGrouping<bool?, T>> source,
	Func<IEnumerable<T>, IEnumerable<T>, IEnumerable<T>, TResult> resultSelector
)

Parameters

source  IEnumerableIGroupingNullableBoolean, T
The source sequence.
resultSelector  FuncIEnumerableT, IEnumerableT, IEnumerableT, TResult
Function that projects the result from sequences of true elements, false elements and null elements, respectively, passed as arguments.

Type Parameters

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

Return Value

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 IEnumerableIGroupingNullableBoolean, 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).

Exceptions

ArgumentNullExceptionsource or resultSelector is .

See Also