Namespace: Assorted.Utils.Collections
Assembly: Assorted.Utils (Assorted.Utils.dll) version 1.1.0.0
Returns the alternative elements of the sequence by a specific interval.
public static IEnumerable<TSource> Alternate<TSource>(
this IEnumerable<TSource> source,
int interval
)
TSource
The type of elements in the source
.
source
: IEnumerable<TSource>
A sequence of values.
interval
: int
The number of alternation.
IEnumerable<TSource>
An System.Collections.Generic.IEnumerable<T>
where each of its elements are in the input sequence.
Exception | Description |
---|---|
System.ArgumentNullException | source is null . |
System.ArgumentOutOfRangeException | interval is zero or negative. |
This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action.
This document is generated by DG.