Click or drag to resize

GeneratorSkipTSource Method

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

Namespace:  Gamelogic.Extensions.Algorithms
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public static IGenerator<TSource> Skip<TSource>(
	this IGenerator<TSource> generator,
	int count
)

Parameters

generator
Type: Gamelogic.Extensions.AlgorithmsIGeneratorTSource
The source generator.
count
Type: SystemInt32
The number of elements to skip.

Type Parameters

TSource
The type of elements of the source generator.

Return Value

Type: IGeneratorTSource
A new generator.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IGeneratorTSource. 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).
Exceptions
ExceptionCondition
ArgumentNullExceptiongenerator is null.
ArgumentOutOfRangeExceptioncount is negative.
Examples
The following generator will generate 3 4 0 1 2 3 4 0 ...
var generator = Generator.Count(5).Skip(3);
See Also