Returns a sequence of values based on indexes.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static IEnumerable<TResult> GenerateByIndex<TResult>( Func<int, TResult> generator )
Public Shared Function GenerateByIndex(Of TResult) ( _ generator As Func(Of Integer, TResult) _ ) As IEnumerable(Of TResult)
public: generic<typename TResult> static IEnumerable<TResult>^ GenerateByIndex( Func<int, TResult>^ generator )
Generic Template Parameters
- TResult
- Type of result to generate
Return Value
A sequence
Remarks
The sequence is (practically) infinite
- the index ranges from 0 to int.MaxValue inclusive. This function defers
execution and streams the results.
Assembly: MoreLinq (Module: MoreLinq.dll) Version: 1.0.16006.0 (1.0.16006.1845)