You can try following:
string GetAllNumbersFrom(int first, int last, int step, string separator)
{
if (step == 0)
throw new ArgumentException("zero step");
if (Math.Sign(last - first) * Math.Sign(step) < 0)
throw new ArgumentException("Cannot reach last in this direction");
int count = Math.Abs((last - first) / step) + 1;
var numbers = Enumerable.Range(0, count).Select(n => first + step * n);
return string.Join(separator, numbers);
}
Explanation: first, we count numbers in the output list: it's distance between numbers divided by step size (and plus 1 for the start number).
Having the count, we first produce sequence 0, 1, 2, ... count-1 with Enumerable.Range. Then, we are transforming it using linear function: shift first number to the first
and adjust the step.