// Recursive Solution:
public Stack<int> NumbersIn(int value)
{
if (value == 0) return new Stack<int>();
var numbers = NumbersIn(value / 10);
numbers.Push(value % 10);
return numbers;
}
var numbers = NumbersIn(987654321).ToArray();
// Without Recursion:
public int[] NumbersIn(int value)
{
var numbers = new Stack<int>();
for(; value > 0; value /= 10)
numbers.Push(value % 10);
return numbers.ToArray();
}