MoreEnumerableSequence(Int32, Int32) Method
Generates a sequence of integral numbers within the (inclusive) specified range.
If sequence is ascending the step is +1, otherwise -1.
Namespace: MoreLinqAssembly: MoreLinq (in MoreLinq.dll) Version: 3.4.0+b99a6a8cc504caf2d48372fe54a2f8116c59cd0c
public static IEnumerable<int> Sequence(
int start,
int stop
)
Public Shared Function Sequence (
start As Integer,
stop As Integer
) As IEnumerable(Of Integer)
public:
static IEnumerable<int>^ Sequence(
int start,
int stop
)
static member Sequence :
start : int *
stop : int -> IEnumerable<int>
- start Int32
- The value of the first integer in the sequence.
- stop Int32
- The value of the last integer in the sequence.
IEnumerableInt32An
IEnumerableT that contains a range of sequential integral numbers.
This operator uses deferred execution and streams its results.
var result = MoreEnumerable.Sequence(6, 0);
The
result variable will contain
{ 6, 5, 4, 3, 2, 1, 0 }.