Say I have
var i = 987654321;
Is there an easy way to get an array of the digits, the equivalent of
var is = new int[] { 9, 8, 7, 6, 5, 4, 3, 2, 1 };
without .ToString()
ing and iterating over the chars with int.Parse(x)
?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…