create range of numbers
Published: 25. November 2011 | Updated: 25. November 2011License: Microsoft Public License (MS-PL)
Categories: Collections, Framework » Math
Tags: C# Collections Math
Snippet example shows simple way how to create range of integers
int start = 8; int count = 10; IEnumerable<int> range = Enumerable.Range(start, count); foreach (int i in range) { Console.WriteLine(i); }Console Output:
8
9
10
11
12
13
14
15
16
17
9
10
11
12
13
14
15
16
17
| Send us feedback about this snippet » |





