Edit

Share via


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

Definition

Generates a sequence that begins with start and yields additional values each incremented by step until endInclusive is reached.

public:
generic <typename T>
 where T : System::Numerics::INumber<T> static System::Collections::Generic::IAsyncEnumerable<T> ^ Sequence(T start, T endInclusive, T step);
public static System.Collections.Generic.IAsyncEnumerable<T> Sequence<T>(T start, T endInclusive, T step) where T : System.Numerics.INumber<T>;
static member Sequence : 'T * 'T * 'T -> System.Collections.Generic.IAsyncEnumerable<'T (requires 'T :> System.Numerics.INumber<'T>)> (requires 'T :> System.Numerics.INumber<'T>)
Public Function Sequence(Of T As INumber(Of T)) (start As T, endInclusive 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. This value will always be included in the resulting sequence.

endInclusive
T

The ending bound beyond which values will not be included in the sequence.

step
T

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

Returns

An IAsyncEnumerable<T> that contains the sequence.

Exceptions

endInclusive is null.

step is zero and endInclusive does not equal start.

Applies to