I had to split an int \"123456\" each value of it to an Int[] and i have already a Solution but i dont know is there any better way : My solution was :
publi
You can do that without converting it to a string and back:
public static int[] intToArray(int num) {
List numbers = new List();
do {
numbers.Insert(0, num % 10);
num /= 10;
} while (num > 0);
return numbers.ToArray();
}
It only works for positive values, of course, but your original code also have that limitation.