Click or drag to resize

XEnumerableGenerateTElement Method (TElement, FuncTElement, TElement)

Generates a sequence from a seed and a generator function.

Namespace:  Linq.Extras
Assembly:  Linq.Extras (in Linq.Extras.dll) Version: 5.0.0+96a4f4bfed64095342c5df107c1fe1fb95603ee5
Syntax
public static IEnumerable<TElement> Generate<TElement>(
	TElement seed,
	Func<TElement, TElement> generator
)

Parameters

seed
Type: TElement
The first element of the sequence.
generator
Type: SystemFuncTElement, TElement
A generator function that returns the next element from the current element.

Type Parameters

TElement
The type of the elements in the sequence.

Return Value

Type: IEnumerableTElement
An infinite sequence of generated elements.
See Also