数组和集合 / 迭代器

using System;
using System.Collections.Generic;

IEnumerable<intCounter(int low, int high, int step) {
    var current = low;
    while (current <= high)
    {
        yield return current;
        current += step;
    }
}

foreach (var i in Counter(392)) {
    Console.WriteLine(i);
}