Editar

Compartilhar via


AsyncEnumerable.InfiniteSequence<T>(T, T) Method

Definition

Generates an infinite sequence that begins with start and yields additional values each incremented by step.

public:
generic <typename T>
 where T : System::Numerics::IAdditionOperators<T, T, T> static System::Collections::Generic::IAsyncEnumerable<T> ^ InfiniteSequence(T start, T step);
public static System.Collections.Generic.IAsyncEnumerable<T> InfiniteSequence<T>(T start, T step) where T : System.Numerics.IAdditionOperators<T,T,T>;
static member InfiniteSequence : 'T * 'T -> System.Collections.Generic.IAsyncEnumerable<'T (requires 'T :> System.Numerics.IAdditionOperators<'T, 'T, 'T>)> (requires 'T :> System.Numerics.IAdditionOperators<'T, 'T, 'T>)
Public Function InfiniteSequence(Of T As IAdditionOperators(Of T, T, T)) (start As T, step As T) As IAsyncEnumerable(Of T)

Type Parameters

T

The type of the value to be yielded in the result sequence.

Parameters

start
T

The starting value.

step
T

The amount by which the next yielded value should be incremented from the previous yielded value.

Returns

An IAsyncEnumerable<T> that contains the sequence.

Applies to