Table of Contents

Method Skip

Namespace
Gamelogic.Extensions.Algorithms
Assembly
Gamelogic.Extensions.dll

Skip<TSource>(IGenerator<TSource>, int)

Makes a generator that skips over the specified number of elements from the source generator.

public static IGenerator<TSource> Skip<TSource>(this IGenerator<TSource> source, int count)

Parameters

source IGenerator<TSource>

The source generator.

count int

The number of elements to skip.

Returns

IGenerator<TSource>

A new generator.

Type Parameters

TSource

The type of elements of the source generator.

Examples

The following generator will generate 3 4 0 1 2 3 4 0 ...

var generator = Generator.Count(5).Skip(3);

Exceptions

ArgumentNullException

generator is null.

ArgumentOutOfRangeException

count is negative.