Utils.Partition<T>(IEnumerable<T>, Func<T,Boolean>) 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 collection into the elements for which predicate returns true and those for which it returns false.
public static (System.Collections.Generic.List<T>, System.Collections.Generic.List<T>) Partition<T> (this System.Collections.Generic.IEnumerable<T> collection, Func<T,bool> predicate);
static member Partition : seq<'T> * Func<'T, bool> -> ValueTuple<System.Collections.Generic.List<'T>, System.Collections.Generic.List<'T>>
<Extension()>
Public Function Partition(Of T) (collection As IEnumerable(Of T), predicate As Func(Of T, Boolean)) As ValueTuple(Of List(Of T), List(Of T))
Type Parameters
- T
Parameters
- collection
- IEnumerable<T>
Returns
- ValueTuple<List<T>,List<T>>