F# has sequences that allows to create sequences:
seq { 0 .. 10 }
Create sequence of numbers from 0 to 10.
Is there something similar in C#?
You can use Enumerable.Range(0, 10);. Example:
Enumerable.Range(0, 10);
var seq = Enumerable.Range(0, 10);
MSDN page here.
2.1m questions
2.1m answers
60 comments
57.0k users