Splits this list into two at a given position.

Namespace: Flinq
Assembly: Flinq (in Flinq.dll) Version: 1.0.2.0 (1.0.2.0)

Collapse imageSyntax

C#
public static Tuple<IEnumerable<A>, IEnumerable<A>> SplitAt<A>(
	this IEnumerable<A> source,
	int n
)

Parameters

source
Type: System.Collections.Generic..::..IEnumerable<(Of <(<'A>)>)>
The input sequence.
n
Type: System..::..Int32
The position at which to split.

Collapse imageType Parameters

A
The type of the elements in the input sequence.

Return Value

Type: Tuple<(Of <(<'IEnumerable<(Of <(<'A>)>)>, IEnumerable<(Of <(<'A>)>)>>)>)>
A pair of lists consisting of the first n elements of this list, and the other elements.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerable<(Of <(<'A>)>)>. 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).

Collapse imageSee Also