Returns a specified number of contiguous elements from the start of a sequence.
Namespace: SequencesAssembly: Sequences (in Sequences.dll) Version: 1.0.1.0 (1.0.1)
Syntax public static ISequence<TSource> Take<TSource>(
this ISequence<TSource> source,
int count
)
public static ISequence<TSource> Take<TSource>(
this ISequence<TSource> source,
int count
)
<ExtensionAttribute>
Public Shared Function Take(Of TSource) (
source As ISequence(Of TSource),
count As Integer
) As ISequence(Of TSource)
<ExtensionAttribute>
Public Shared Function Take(Of TSource) (
source As ISequence(Of TSource),
count As Integer
) As ISequence(Of TSource)
public:
[ExtensionAttribute]
generic<typename TSource>
static ISequence<TSource>^ Take(
ISequence<TSource>^ source,
int count
)
public:
[ExtensionAttribute]
generic<typename TSource>
static ISequence<TSource>^ Take(
ISequence<TSource>^ source,
int count
)
static member Take :
source : ISequence<'TSource> *
count : int -> ISequence<'TSource>
static member Take :
source : ISequence<'TSource> *
count : int -> ISequence<'TSource>
Parameters
- source
- Type: Sequences ISequence TSource
The sequence to return elements from.
- count
- Type: System Int32
The number of elements to return.
Type Parameters - TSource
- The type of the elements of source.
Return Value
Type:
ISequence TSource A sequence that contains the specified number of elements from the start of the input sequence.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
ISequence TSource . 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